diff --git a/app/core/src/test/java/com/fsck/k9/message/MessageBuilderTest.java b/app/core/src/test/java/com/fsck/k9/message/MessageBuilderTest.java index 97b090bcd..f6ed38e00 100644 --- a/app/core/src/test/java/com/fsck/k9/message/MessageBuilderTest.java +++ b/app/core/src/test/java/com/fsck/k9/message/MessageBuilderTest.java @@ -404,7 +404,7 @@ public class MessageBuilderTest extends RobolectricTest { .setIdentity(identity) .setMessageFormat(SimpleMessageFormat.TEXT) .setText(TEST_MESSAGE_TEXT) - .setAttachments(new ArrayList()) + .setAttachments(new ArrayList<>()) .setSignature("signature") .setQuoteStyle(QuoteStyle.PREFIX) .setQuotedTextMode(QuotedTextMode.NONE) diff --git a/app/k9mail/src/main/java/com/fsck/k9/external/MessageProvider.java b/app/k9mail/src/main/java/com/fsck/k9/external/MessageProvider.java index 320b83e10..d3929ff5a 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/external/MessageProvider.java +++ b/app/k9mail/src/main/java/com/fsck/k9/external/MessageProvider.java @@ -536,7 +536,7 @@ public class MessageProvider extends ContentProvider { if (MessageColumns._ID.equals(field)) { extractors.put(field, new IdExtractor()); } else if (MessageColumns._COUNT.equals(field)) { - extractors.put(field, new CountExtractor(count)); + extractors.put(field, new CountExtractor<>(count)); } else if (MessageColumns.SUBJECT.equals(field)) { extractors.put(field, new SubjectExtractor()); } else if (MessageColumns.SENDER.equals(field)) { diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/AttachmentPresenter.java b/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/AttachmentPresenter.java index 59b27ce9e..6f2f734e4 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/AttachmentPresenter.java +++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/AttachmentPresenter.java @@ -119,7 +119,7 @@ public class AttachmentPresenter { } public List getAttachments() { - return new ArrayList(attachments.values()); + return new ArrayList<>(attachments.values()); } public void onClickAddAttachment(RecipientPresenter recipientPresenter) { diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/RecipientLoader.java b/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/RecipientLoader.java index cd0f09814..13ec8c0fc 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/RecipientLoader.java +++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/RecipientLoader.java @@ -381,7 +381,7 @@ public class RecipientLoader extends AsyncTaskLoader> { return recipients; } - fillContactDataFromCursor(cursor, recipients, new HashMap(), null, maxRecipients); + fillContactDataFromCursor(cursor, recipients, new HashMap<>(), null, maxRecipients); return recipients; } diff --git a/mail/common/src/main/java/com/fsck/k9/mail/internet/MessageExtractor.java b/mail/common/src/main/java/com/fsck/k9/mail/internet/MessageExtractor.java index d4d56843a..5d458d40e 100644 --- a/mail/common/src/main/java/com/fsck/k9/mail/internet/MessageExtractor.java +++ b/mail/common/src/main/java/com/fsck/k9/mail/internet/MessageExtractor.java @@ -234,7 +234,7 @@ public class MessageExtractor { public static List collectAttachments(Message message) throws MessagingException { try { List attachments = new ArrayList<>(); - findViewablesAndAttachments(message, new ArrayList(), attachments); + findViewablesAndAttachments(message, new ArrayList<>(), attachments); return attachments; } catch (Exception e) { throw new MessagingException("Couldn't collect attachment parts", e);