diff options
-rw-r--r-- | build.gradle | 4 | ||||
-rw-r--r-- | src/main/java/com/juick/XMPPManager.java | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/build.gradle b/build.gradle index 156701f5..c4d0aaf0 100644 --- a/build.gradle +++ b/build.gradle @@ -199,5 +199,5 @@ bootRun { npmCompile.dependsOn 'npmInstall' processResources.dependsOn 'npmCompile' -sourceCompatibility = JavaVersion.VERSION_11 -targetCompatibility = JavaVersion.VERSION_11 +sourceCompatibility = JavaVersion.VERSION_15 +targetCompatibility = JavaVersion.VERSION_15 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<String> allowedTypes = new ArrayList<>() {{ - add("png"); - add("jpg"); - }}; + List<String> allowedTypes = List.of("png", "jpg"); String attachmentExtension = FilenameUtils.getExtension(e.getName()).toLowerCase(); String targetFilename = String.format("%s.%s", DigestUtils.md5Hex(String.format("%s-%s", |