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);
}
/**
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 c62f96215..2aed087a5 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
@@ -638,9 +638,9 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
packetWriter = new PacketWriter();
packetReader = new PacketReader();
}
- // 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();
}
@@ -1001,7 +1001,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
public void run() {
parsePackets();
}
- }, "Smack Packet Reader (" + getConnectionCounter() + ")");
+ }, "Smack Reader (" + getConnectionCounter() + ")");
}
/**
@@ -1297,7 +1297,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
public void run() {
writePackets();
}
- }, "Smack Packet Writer (" + getConnectionCounter() + ")");
+ }, "Smack Writer (" + getConnectionCounter() + ")");
}
private boolean done() {
@@ -1375,7 +1375,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;