Infer type.

This commit is contained in:
Tobias Preuss 2020-07-08 13:58:07 +02:00
parent 0c40a77273
commit 9c6d08142a
5 changed files with 5 additions and 5 deletions

View file

@ -404,7 +404,7 @@ public class MessageBuilderTest extends RobolectricTest {
.setIdentity(identity)
.setMessageFormat(SimpleMessageFormat.TEXT)
.setText(TEST_MESSAGE_TEXT)
.setAttachments(new ArrayList<Attachment>())
.setAttachments(new ArrayList<>())
.setSignature("signature")
.setQuoteStyle(QuoteStyle.PREFIX)
.setQuotedTextMode(QuotedTextMode.NONE)

View file

@ -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<MessageInfoHolder>(count));
extractors.put(field, new CountExtractor<>(count));
} else if (MessageColumns.SUBJECT.equals(field)) {
extractors.put(field, new SubjectExtractor());
} else if (MessageColumns.SENDER.equals(field)) {

View file

@ -119,7 +119,7 @@ public class AttachmentPresenter {
}
public List<com.fsck.k9.message.Attachment> getAttachments() {
return new ArrayList<com.fsck.k9.message.Attachment>(attachments.values());
return new ArrayList<>(attachments.values());
}
public void onClickAddAttachment(RecipientPresenter recipientPresenter) {

View file

@ -381,7 +381,7 @@ public class RecipientLoader extends AsyncTaskLoader<List<Recipient>> {
return recipients;
}
fillContactDataFromCursor(cursor, recipients, new HashMap<String, Recipient>(), null, maxRecipients);
fillContactDataFromCursor(cursor, recipients, new HashMap<>(), null, maxRecipients);
return recipients;
}

View file

@ -234,7 +234,7 @@ public class MessageExtractor {
public static List<Part> collectAttachments(Message message) throws MessagingException {
try {
List<Part> attachments = new ArrayList<>();
findViewablesAndAttachments(message, new ArrayList<Viewable>(), attachments);
findViewablesAndAttachments(message, new ArrayList<>(), attachments);
return attachments;
} catch (Exception e) {
throw new MessagingException("Couldn't collect attachment parts", e);