From 347195fae160c616a4288b6ae569a18c50973984 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 16 Aug 2020 11:39:20 +0200 Subject: [PATCH] Workaround invalid uid/seqnums --- .../main/java/com/sun/mail/imap/IMAPFolder.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/src/main/java/com/sun/mail/imap/IMAPFolder.java b/app/src/main/java/com/sun/mail/imap/IMAPFolder.java index d846cd9fc7..247bded28e 100644 --- a/app/src/main/java/com/sun/mail/imap/IMAPFolder.java +++ b/app/src/main/java/com/sun/mail/imap/IMAPFolder.java @@ -2630,6 +2630,20 @@ public class IMAPFolder extends Folder implements UIDFolder, ResponseHandler { throw new FolderClosedException(this, cex.getMessage()); } catch (ProtocolException pex) { throw new MessagingException(pex.getMessage(), pex); + } catch (ArrayIndexOutOfBoundsException ex) { + eu.faircode.email.Log.w(ex); + /* + java.lang.ArrayIndexOutOfBoundsException: message number (0) out of bounds (110) + at com.sun.mail.imap.MessageCache.getMessage(SourceFile:116) + at com.sun.mail.imap.MessageCache.getMessageBySeqnum(SourceFile:148) + at com.sun.mail.imap.IMAPFolder.getMessageBySeqNumber(SourceFile:3999) + at com.sun.mail.imap.IMAPFolder.processFetchResponse(SourceFile:3604) + at com.sun.mail.imap.IMAPFolder.handleResponse(SourceFile:3586) + at com.sun.mail.iap.Protocol.notifyResponseHandlers(SourceFile:245) + at com.sun.mail.imap.protocol.IMAPProtocol.fetchSequenceNumber(SourceFile:2057) + at com.sun.mail.imap.IMAPFolder.getMessageByUID(SourceFile:2598) + */ + return null; } return m;