mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-23 06:42:05 +01:00
Throw exception in sendPacket if packet is null.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2151 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
ef8d1f794d
commit
63e1d822a5
1 changed files with 3 additions and 0 deletions
|
@ -545,6 +545,9 @@ public class XMPPConnection {
|
||||||
if (!isConnected()) {
|
if (!isConnected()) {
|
||||||
throw new IllegalStateException("Not connected to server.");
|
throw new IllegalStateException("Not connected to server.");
|
||||||
}
|
}
|
||||||
|
if (packet == null) {
|
||||||
|
throw new NullPointerException("Packet is null.");
|
||||||
|
}
|
||||||
packetWriter.sendPacket(packet);
|
packetWriter.sendPacket(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue