1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 22:12: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:
Matt Tucker 2003-10-20 12:46:48 +00:00 committed by mtucker
parent ef8d1f794d
commit 63e1d822a5

View file

@ -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);
} }