From fe7c0ebfac2c49ed822cd520565eb0259bcc7baa Mon Sep 17 00:00:00 2001 From: Art O Cathain Date: Sun, 5 Oct 2014 11:57:11 +0100 Subject: [PATCH] simplify following code review --- src/com/fsck/k9/controller/MessagingController.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/com/fsck/k9/controller/MessagingController.java b/src/com/fsck/k9/controller/MessagingController.java index f8d0ad94e..5e1ff4956 100644 --- a/src/com/fsck/k9/controller/MessagingController.java +++ b/src/com/fsck/k9/controller/MessagingController.java @@ -2712,10 +2712,8 @@ public class MessagingController implements Runnable { Store localStore = account.getLocalStore(); LocalFolder localFolder = (LocalFolder)localStore.getFolder(account.getErrorFolderName()); - List messages = new ArrayList(); MimeMessage message = new MimeMessage(); - message.setBody(new TextBody(body)); message.setFlag(Flag.X_DOWNLOADED_FULL, true); message.setSubject(subject); @@ -2725,9 +2723,8 @@ public class MessagingController implements Runnable { message.setInternalDate(nowDate); message.addSentDate(nowDate); message.setFrom(new Address(account.getEmail(), "K9mail internal")); - messages.set(0, message); - localFolder.appendMessages(messages); + localFolder.appendMessages(Collections.singletonList(message)); localFolder.clearMessagesOlderThan(nowTime - (15 * 60 * 1000));