mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-24 17:52:17 -05:00
switch/case can't deal with null pointers
This commit is contained in:
parent
cd204d5931
commit
c32162c280
@ -39,6 +39,9 @@ public class IqPacket extends AbstractStanza {
|
||||
|
||||
public TYPE getType() {
|
||||
final String type = getAttribute("type");
|
||||
if (type == null) {
|
||||
return TYPE.INVALID;
|
||||
}
|
||||
switch (type) {
|
||||
case "error":
|
||||
return TYPE.ERROR;
|
||||
|
Loading…
Reference in New Issue
Block a user