Bullet proofing for user-reported exceptions in WebDAV sync:
E/k9 ( 5735): java.lang.NullPointerException E/k9 ( 5735): at com.kaitenmail.mail.store.WebDavStore$WebDavMessage.setNewHeaders(WebDavStore.java:1903) E/k9 ( 5735): at com.kaitenmail.mail.store.WebDavStore$WebDavFolder.fetchEnvelope(WebDavStore.java:1655) E/k9 ( 5735): at com.kaitenmail.mail.store.WebDavStore$WebDavFolder.fetchEnvelope(WebDavStore.java:1627) E/k9 ( 5735): at com.kaitenmail.mail.store.WebDavStore$WebDavFolder.fetchEnvelope(WebDavStore.java:1627) E/k9 ( 5735): at com.kaitenmail.mail.store.WebDavStore$WebDavFolder.fetchEnvelope(WebDavStore.java:1627) E/k9 ( 5735): at com.kaitenmail.mail.store.WebDavStore$WebDavFolder.fetchEnvelope(WebDavStore.java:1627) E/k9 ( 5735): at com.kaitenmail.mail.store.WebDavStore$WebDavFolder.fetch(WebDavStore.java:1404) E/k9 ( 5735): at com.kaitenmail.controller.MessagingController.fetchUnsyncedMessages(MessagingController.java:1418) E/k9 ( 5735): at com.kaitenmail.controller.MessagingController.downloadMessages(MessagingController.java:1253) E/k9 ( 5735): at com.kaitenmail.controller.MessagingController.synchronizeMailboxSynchronous(MessagingController.java:1031) E/k9 ( 5735): at com.kaitenmail.controller.MessagingController.access$400(MessagingController.java:81) E/k9 ( 5735): at com.kaitenmail.controller.MessagingController$30.run(MessagingController.java:3768) E/k9 ( 5735): at com.kaitenmail.controller.MessagingController.run(MessagingController.java:276) E/k9 ( 5735): at java.lang.Thread.run(Thread.java:1096)
This commit is contained in:
parent
c7e8969b01
commit
8cffc5b682
1 changed files with 7 additions and 2 deletions
|
@ -1652,8 +1652,13 @@ public class WebDavStore extends Store {
|
|||
listener.messageStarted(messages[i].getUid(), i, count);
|
||||
}
|
||||
|
||||
wdMessage.setNewHeaders(envelopes.get(wdMessage.getUid()));
|
||||
wdMessage.setFlagInternal(Flag.SEEN, envelopes.get(wdMessage.getUid()).getReadStatus());
|
||||
ParsedMessageEnvelope envelope = envelopes.get(wdMessage.getUid());
|
||||
if (envelope != null) {
|
||||
wdMessage.setNewHeaders(envelope);
|
||||
wdMessage.setFlagInternal(Flag.SEEN, envelope.getReadStatus());
|
||||
} else {
|
||||
Log.e(K9.LOG_TAG,"Asked to get metadata for a non-existent message: "+wdMessage.getUid());
|
||||
}
|
||||
|
||||
if (listener != null) {
|
||||
listener.messageFinished(messages[i], i, count);
|
||||
|
|
Loading…
Reference in a new issue