mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 09:08:49 -05:00
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
@ -1652,8 +1652,13 @@ public class WebDavStore extends Store {
|
|||||||
listener.messageStarted(messages[i].getUid(), i, count);
|
listener.messageStarted(messages[i].getUid(), i, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
wdMessage.setNewHeaders(envelopes.get(wdMessage.getUid()));
|
ParsedMessageEnvelope envelope = envelopes.get(wdMessage.getUid());
|
||||||
wdMessage.setFlagInternal(Flag.SEEN, envelopes.get(wdMessage.getUid()).getReadStatus());
|
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) {
|
if (listener != null) {
|
||||||
listener.messageFinished(messages[i], i, count);
|
listener.messageFinished(messages[i], i, count);
|
||||||
|
Loading…
Reference in New Issue
Block a user