Throw IAE in IQReplyFilter if there is no local JID

available yet.
This commit is contained in:
Florian Schmaus 2015-01-30 09:37:55 +01:00
parent 5a56ff011b
commit 4a769b0262
1 changed files with 5 additions and 1 deletions

View File

@ -89,7 +89,11 @@ public class IQReplyFilter implements PacketFilter {
} else {
to = null;
}
local = conn.getUser().toLowerCase(Locale.US);
final String localJid = conn.getUser();
if (localJid == null) {
throw new IllegalArgumentException("Must have a local (user) JID set. Either you didn't configure one or you where not connected at least once");
}
local = localJid.toLowerCase(Locale.US);
server = conn.getServiceName().toLowerCase(Locale.US);
packetId = iqPacket.getPacketID();