mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-29 15:32:06 +01:00
Make StreamOpen.toXML(String) 'null' aware
This commit is contained in:
parent
271ac7ee7a
commit
5097f01b7a
1 changed files with 3 additions and 0 deletions
|
@ -100,6 +100,9 @@ public class StreamOpen implements Nonza {
|
||||||
XmlStringBuilder xml = new XmlStringBuilder();
|
XmlStringBuilder xml = new XmlStringBuilder();
|
||||||
xml.halfOpenElement(getElementName());
|
xml.halfOpenElement(getElementName());
|
||||||
// We always want to state 'xmlns' for stream open tags.
|
// We always want to state 'xmlns' for stream open tags.
|
||||||
|
if (enclosingNamespace == null) {
|
||||||
|
enclosingNamespace = CLIENT_NAMESPACE;
|
||||||
|
}
|
||||||
xml.attribute("xmlns", enclosingNamespace);
|
xml.attribute("xmlns", enclosingNamespace);
|
||||||
|
|
||||||
xml.attribute("to", to);
|
xml.attribute("to", to);
|
||||||
|
|
Loading…
Reference in a new issue