diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-12-16 22:14:50 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-12-16 22:14:50 +0100 |
commit | e87c2b325bc372536f0c29bc72660143272d8086 (patch) | |
tree | 590402cc0925021f4eb73df8b4073af272c18823 | |
parent | a4e828aba5f3a85b27738b7f7956e8267a960245 (diff) |
fix XmppUri for empty uris
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/XmppUri.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/utils/XmppUri.java b/src/main/java/de/pixart/messenger/utils/XmppUri.java index 24c0b3bff..24f1efafe 100644 --- a/src/main/java/de/pixart/messenger/utils/XmppUri.java +++ b/src/main/java/de/pixart/messenger/utils/XmppUri.java @@ -76,7 +76,12 @@ public class XmppUri { if (uri.getAuthority() != null) { jid = uri.getAuthority(); } else { - jid = uri.getSchemeSpecificPart().split("\\?")[0]; + String[] parts = uri.getSchemeSpecificPart().split("\\?"); + if (parts.length > 1) { + jid = parts[0]; + } else { + return; + } } this.fingerprints = parseFingerprints(uri.getQuery()); this.body = parseBody(uri.getQuery()); |