aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-12-16 22:14:50 +0100
committerChristian Schneppe <christian@pix-art.de>2017-12-16 22:14:50 +0100
commite87c2b325bc372536f0c29bc72660143272d8086 (patch)
tree590402cc0925021f4eb73df8b4073af272c18823 /src/main/java/de/pixart/messenger
parenta4e828aba5f3a85b27738b7f7956e8267a960245 (diff)
fix XmppUri for empty uris
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/utils/XmppUri.java7
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());