diff --git a/k9mail-library/src/main/java/com/fsck/k9/mail/internet/ListHeaders.java b/k9mail-library/src/main/java/com/fsck/k9/mail/internet/ListHeaders.java index 3cc9d9519..583b91561 100644 --- a/k9mail-library/src/main/java/com/fsck/k9/mail/internet/ListHeaders.java +++ b/k9mail-library/src/main/java/com/fsck/k9/mail/internet/ListHeaders.java @@ -41,7 +41,7 @@ public class ListHeaders { public static Address[] getListPostAddresses(Message message) { String[] headerValues = getHeaderValues(message, LIST_POST_HEADER); - if (headerValues == null || headerValues.length < 1) { + if (headerValues.length < 1) { return new Address[0]; } diff --git a/k9mail/src/test/java/com/fsck/k9/helper/ReplyToParserTest.java b/k9mail/src/test/java/com/fsck/k9/helper/ReplyToParserTest.java index 7333951d8..68794450b 100644 --- a/k9mail/src/test/java/com/fsck/k9/helper/ReplyToParserTest.java +++ b/k9mail/src/test/java/com/fsck/k9/helper/ReplyToParserTest.java @@ -145,6 +145,7 @@ public class ReplyToParserTest { when(message.getFrom()).thenReturn(arrayConcatenate(FROM_ADDRESSES, REPLY_TO_ADDRESSES, Address.class)); when(message.getRecipients(RecipientType.TO)).thenReturn(arrayConcatenate(FROM_ADDRESSES, TO_ADDRESSES, Address.class)); when(message.getRecipients(RecipientType.CC)).thenReturn(arrayConcatenate(CC_ADDRESSES, TO_ADDRESSES, Address.class)); + when(message.getHeader(ListHeaders.LIST_POST_HEADER)).thenReturn(new String[0]); ReplyToAddresses recipientsToReplyAllTo = replyToParser.getRecipientsToReplyAllTo(message, account);