XmppUri: Add toString() method

This commit is contained in:
Christian Schneppe 2018-02-15 19:29:14 +01:00
parent 390d61d82c
commit 43eb293c66

View file

@ -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, ';');
}