Fix test instead of adding null check to ListHeaders

This commit is contained in:
cketti 2016-05-20 23:39:55 +02:00
parent 43899da77c
commit 7e829bbfb7
2 changed files with 2 additions and 1 deletions

View file

@ -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];
}

View file

@ -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);