1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-12-07 13:41:08 +01:00

Move duplicate sendPacket() code into XMPPConnection

This commit is contained in:
Florian Schmaus 2014-03-17 19:33:17 +01:00
parent c3f9ec4f94
commit 6197f6200f
5 changed files with 26 additions and 48 deletions

View file

@ -185,19 +185,11 @@ public class DummyConnection extends XMPPConnection {
}
@Override
public void sendPacket(Packet packet) {
if (!isConnected()) {
throw new IllegalStateException("Not connected to server.");
}
if (packet == null) {
throw new NullPointerException("Packet is null.");
}
firePacketInterceptors(packet);
void sendPacketInternal(Packet packet) {
if (DEBUG_ENABLED) {
System.out.println("[SEND]: " + packet.toXML());
}
queue.add(packet);
firePacketSendingListeners(packet);
}
/**