From e87c2b325bc372536f0c29bc72660143272d8086 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sat, 16 Dec 2017 22:14:50 +0100 Subject: fix XmppUri for empty uris --- src/main/java/de/pixart/messenger/utils/XmppUri.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main') 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()); -- cgit v1.2.3