XmppUri: Add toString() method

This commit is contained in:
Marc Schink 2018-02-14 16:51:31 +01:00
parent af778b0f4b
commit c7d2b65982

View file

@ -13,6 +13,7 @@ import eu.siacs.conversations.xmpp.jid.Jid;
public class XmppUri {
protected Uri uri;
protected String jid;
protected List<Fingerprint> 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<String> segments = uri.getPathSegments();
@ -111,6 +113,13 @@ public class XmppUri {
}
}
public String toString() {
if (uri != null) {
return uri.toString();
}
return "";
}
protected List<Fingerprint> parseFingerprints(String query) {
return parseFingerprints(query,';');
}