From e935feb0686d1395b51430824e13e842c9d3e1de Mon Sep 17 00:00:00 2001 From: Art O Cathain Date: Wed, 1 Jul 2015 16:59:57 +0100 Subject: [PATCH] extract variable per review comment --- .../src/main/java/com/fsck/k9/activity/MessageCompose.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/k9mail/src/main/java/com/fsck/k9/activity/MessageCompose.java b/k9mail/src/main/java/com/fsck/k9/activity/MessageCompose.java index 57e2fe666..31e6073d5 100644 --- a/k9mail/src/main/java/com/fsck/k9/activity/MessageCompose.java +++ b/k9mail/src/main/java/com/fsck/k9/activity/MessageCompose.java @@ -2379,8 +2379,10 @@ public class MessageCompose extends K9Activity implements OnClickListener, // Decode the identity header when loading a draft. // See buildIdentityHeader(TextBody) for a detailed description of the composition of this blob. Map k9identity = new HashMap(); - if (message.getHeader(K9.IDENTITY_HEADER).length > 0 && message.getHeader(K9.IDENTITY_HEADER)[0] != null) { - k9identity = IdentityHeaderParser.parse(message.getHeader(K9.IDENTITY_HEADER)[0]); + String[] identityHeaders = message.getHeader(K9.IDENTITY_HEADER); + + if (identityHeaders.length > 0 && identityHeaders[0] != null) { + k9identity = IdentityHeaderParser.parse(identityHeaders[0]); } Identity newIdentity = new Identity();