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 49f6dc66a..780adc40f 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); }