1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-21 22:02:06 +01:00

Make StreamOpen.toXML(String) 'null' aware

This commit is contained in:
Florian Schmaus 2018-09-11 09:42:08 +02:00
parent 271ac7ee7a
commit 5097f01b7a

View file

@ -100,6 +100,9 @@ public class StreamOpen implements Nonza {
XmlStringBuilder xml = new XmlStringBuilder();
xml.halfOpenElement(getElementName());
// We always want to state 'xmlns' for stream open tags.
if (enclosingNamespace == null) {
enclosingNamespace = CLIENT_NAMESPACE;
}
xml.attribute("xmlns", enclosingNamespace);
xml.attribute("to", to);