From 17972adb2c94dd425c0144d71150212dab939d91 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 19 Oct 2020 09:48:51 +0300 Subject: More fixes for JDT warnings * set target JDK to 15 --- src/main/java/com/juick/XMPPManager.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/main/java/com/juick/XMPPManager.java b/src/main/java/com/juick/XMPPManager.java index f2d568af..2565f87e 100644 --- a/src/main/java/com/juick/XMPPManager.java +++ b/src/main/java/com/juick/XMPPManager.java @@ -195,10 +195,7 @@ public class XMPPManager implements NotificationListener { FileTransferManager fileTransferManager = xmpp.getManager(FileTransferManager.class); fileTransferManager.addFileTransferOfferListener(e -> { try { - List allowedTypes = new ArrayList<>() {{ - add("png"); - add("jpg"); - }}; + List allowedTypes = List.of("png", "jpg"); String attachmentExtension = FilenameUtils.getExtension(e.getName()).toLowerCase(); String targetFilename = String.format("%s.%s", DigestUtils.md5Hex(String.format("%s-%s", -- cgit v1.2.3