diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-02-15 19:29:14 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-02-15 19:29:14 +0100 |
commit | 43eb293c666eb00d44eaa13d5f566a6dc68ede13 (patch) | |
tree | 111eb8e6f390fb9dc1b5603e978fb2bcaa69db33 | |
parent | 390d61d82cf981336473cd40c55adc86c7cbe98d (diff) |
XmppUri: Add toString() method
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/XmppUri.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/utils/XmppUri.java b/src/main/java/de/pixart/messenger/utils/XmppUri.java index daa14a3c3..0600986c7 100644 --- a/src/main/java/de/pixart/messenger/utils/XmppUri.java +++ b/src/main/java/de/pixart/messenger/utils/XmppUri.java @@ -13,6 +13,7 @@ import de.pixart.messenger.xmpp.jid.Jid; public class XmppUri { + protected Uri uri; protected String jid; protected String fingerprint; protected List<Fingerprint> fingerprints = new ArrayList<>(); @@ -56,6 +57,7 @@ public class XmppUri { } protected void parse(Uri uri) { + this.uri = uri; String scheme = uri.getScheme(); String host = uri.getHost(); List<String> segments = uri.getPathSegments(); @@ -112,6 +114,13 @@ public class XmppUri { } } + public String toString() { + if (uri != null) { + return uri.toString(); + } + return ""; + } + protected List<Fingerprint> parseFingerprints(String query) { return parseFingerprints(query, ';'); } |