From dfe5c5c09fcb1352991597147ff70ba8e5b454ba Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Wed, 7 Feb 2018 21:44:59 +0100 Subject: [PATCH 1/3] Smack 4.2.4-SNAPSHOT --- version.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.gradle b/version.gradle index 2a7c279ea..82aae01ad 100644 --- a/version.gradle +++ b/version.gradle @@ -1,7 +1,7 @@ allprojects { ext { - shortVersion = '4.2.3' - isSnapshot = false + shortVersion = '4.2.4' + isSnapshot = true jxmppVersion = '0.6.0' smackMinAndroidSdk = 8 } From 6dfc20ee5e40ab4d36729a2c69318bec9b243b85 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Fri, 9 Feb 2018 10:26:42 +0100 Subject: [PATCH 2/3] Rename "Packet (Reader|Writer)" to just Reader or Writer --- .../org/jivesoftware/smack/tcp/XMPPTCPConnection.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java index 76f197676..c1830a03e 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java @@ -647,9 +647,9 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { } } } - // Start the packet writer. This will open an XMPP stream to the server + // Start the writer thread. This will open an XMPP stream to the server packetWriter.init(); - // Start the packet reader. The startup() method will block until we + // Start the reader thread. The startup() method will block until we // get an opening stream packet back from server packetReader.init(); } @@ -1009,7 +1009,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { public void run() { parsePackets(); } - }, "Smack Packet Reader (" + getConnectionCounter() + ")"); + }, "Smack Reader (" + getConnectionCounter() + ")"); } /** @@ -1305,7 +1305,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { public void run() { writePackets(); } - }, "Smack Packet Writer (" + getConnectionCounter() + ")"); + }, "Smack Writer (" + getConnectionCounter() + ")"); } private boolean done() { @@ -1383,7 +1383,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { catch (InterruptedException e) { if (!queue.isShutdown()) { // Users shouldn't try to interrupt the packet writer thread - LOGGER.log(Level.WARNING, "Packet writer thread was interrupted. Don't do that. Use disconnect() instead.", e); + LOGGER.log(Level.WARNING, "Writer thread was interrupted. Don't do that. Use disconnect() instead.", e); } } return packet; From 278c15d52dc8721c2e504ce665bde7649db6c43b Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sat, 10 Feb 2018 12:08:40 +0100 Subject: [PATCH 3/3] Deprecate some chat2 ChatManager APIs because their functional interfaces clashes. This helps to prepare Smack for Java 8 where such a construct results in a compile time error. --- .../jivesoftware/smack/chat2/ChatManager.java | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/smack-extensions/src/main/java/org/jivesoftware/smack/chat2/ChatManager.java b/smack-extensions/src/main/java/org/jivesoftware/smack/chat2/ChatManager.java index 6448900ac..2871b424f 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smack/chat2/ChatManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smack/chat2/ChatManager.java @@ -218,12 +218,24 @@ public final class ChatManager extends Manager { * * @param listener the listener to remove. * @return true if the listener was active and got removed. + * @deprecated Use {@link #removeIncomingListener(IncomingChatMessageListener)} instead. */ + @Deprecated @SuppressWarnings("FunctionalInterfaceClash") public boolean removeListener(IncomingChatMessageListener listener) { return incomingListeners.remove(listener); } + /** + * Remove an incoming chat message listener. + * + * @param listener the listener to remove. + * @return true if the listener was active and got removed. + */ + public boolean removeIncomingListener(IncomingChatMessageListener listener) { + return incomingListeners.remove(listener); + } + /** * Add a new listener for outgoing chat messages. * @@ -252,9 +264,11 @@ public final class ChatManager extends Manager { * * @param listener the listener to remove. * @return true if the listener was active and got removed. + * @deprecated use {@link #removeOutgoingListener(OutgoingChatMessageListener)} instead. */ + @Deprecated public boolean removeListener(OutgoingChatMessageListener listener) { - return outgoingListeners.remove(listener); + return removeOutgoingListener(listener); } /** @@ -262,11 +276,9 @@ public final class ChatManager extends Manager { * * @param listener the listener to remove. * @return true if the listener was active and got removed. - * @deprecated use {@link #removeListener(OutgoingChatMessageListener)} instead. */ - @Deprecated - public boolean removeOutoingLIstener(OutgoingChatMessageListener listener) { - return removeListener(listener); + public boolean removeOutgoingListener(OutgoingChatMessageListener listener) { + return outgoingListeners.remove(listener); } /**