From 20eabca1b3e55ad8af27aea154d7c7abc759d724 Mon Sep 17 00:00:00 2001 From: vanitasvitae Date: Mon, 26 Jun 2017 15:04:22 +0200 Subject: [PATCH] Also replace list with single transport-info info --- .../jingle/element/JingleContentTransport.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentTransport.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentTransport.java index 156caf3cd..712eaaaba 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentTransport.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentTransport.java @@ -31,13 +31,13 @@ public abstract class JingleContentTransport implements ExtensionElement { public static final String ELEMENT = "transport"; protected final List candidates; - protected final List infos; + protected final JingleContentTransportInfo info; protected JingleContentTransport(List candidates) { this(candidates, null); } - protected JingleContentTransport(List candidates, List infos) { + protected JingleContentTransport(List candidates, JingleContentTransportInfo info) { if (candidates != null) { this.candidates = Collections.unmodifiableList(candidates); } @@ -45,19 +45,15 @@ public abstract class JingleContentTransport implements ExtensionElement { this.candidates = Collections.emptyList(); } - if (infos != null) { - this.infos = infos; - } else { - this.infos = Collections.emptyList(); - } + this.info = info; } public List getCandidates() { return candidates; } - public List getInfos() { - return infos; + public JingleContentTransportInfo getInfo() { + return info; } @Override @@ -81,7 +77,7 @@ public abstract class JingleContentTransport implements ExtensionElement { xml.rightAngleBracket(); xml.append(candidates); - xml.append(infos); + xml.optElement(info); xml.closeElement(this); }