From c7d2b65982ca949e0ac218f11bb116977ecbcccc Mon Sep 17 00:00:00 2001 From: Marc Schink Date: Wed, 14 Feb 2018 16:51:31 +0100 Subject: [PATCH] XmppUri: Add toString() method --- src/main/java/eu/siacs/conversations/utils/XmppUri.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/utils/XmppUri.java b/src/main/java/eu/siacs/conversations/utils/XmppUri.java index 2719acf36..d66094f1f 100644 --- a/src/main/java/eu/siacs/conversations/utils/XmppUri.java +++ b/src/main/java/eu/siacs/conversations/utils/XmppUri.java @@ -13,6 +13,7 @@ import eu.siacs.conversations.xmpp.jid.Jid; public class XmppUri { + protected Uri uri; protected String jid; protected List fingerprints = new ArrayList<>(); private String body; @@ -52,6 +53,7 @@ public class XmppUri { } protected void parse(Uri uri) { + this.uri = uri; String scheme = uri.getScheme(); String host = uri.getHost(); List segments = uri.getPathSegments(); @@ -111,6 +113,13 @@ public class XmppUri { } } + public String toString() { + if (uri != null) { + return uri.toString(); + } + return ""; + } + protected List parseFingerprints(String query) { return parseFingerprints(query,';'); }