aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp-ft
diff options
context:
space:
mode:
Diffstat (limited to 'juick-xmpp-ft')
-rw-r--r--juick-xmpp-ft/src/main/java/com/juick/components/XMPPFTServer.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/juick-xmpp-ft/src/main/java/com/juick/components/XMPPFTServer.java b/juick-xmpp-ft/src/main/java/com/juick/components/XMPPFTServer.java
index d411179c1..7da2099e8 100644
--- a/juick-xmpp-ft/src/main/java/com/juick/components/XMPPFTServer.java
+++ b/juick-xmpp-ft/src/main/java/com/juick/components/XMPPFTServer.java
@@ -40,7 +40,10 @@ public class XMPPFTServer implements AutoCloseable {
FileTransferManager fileTransferManager = component.getManager(FileTransferManager.class);
fileTransferManager.addFileTransferOfferListener(e -> {
try {
- List<String> allowedTypes = new ArrayList<String>() {{ add("png"); add("jpg"); }};
+ List<String> allowedTypes = new ArrayList<String>() {{
+ add("png");
+ add("jpg");
+ }};
String attachmentExtension = FilenameUtils.getExtension(e.getName()).toLowerCase();
String targetFilename = String.format("%s.%s",
DigestUtils.md5Hex(String.format("%s-%s",
@@ -49,7 +52,7 @@ public class XMPPFTServer implements AutoCloseable {
Path filePath = Paths.get(tmpDir, targetFilename);
FileTransfer ft = e.accept(filePath).get();
ft.addFileTransferStatusListener(st -> {
- logger.debug(String.format("%s: received %d of %d", e.getName(), st.getBytesTransferred(), e.getSize()));
+ logger.debug("{}: received {} of {}", e.getName(), st.getBytesTransferred(), e.getSize());
if (ft.isDone()) {
logger.info("transfer completed");
Message msg = new Message();