Fix NPE in DiscoverInfo.Identities XmlStringBuilder

The 'name' attribute of an service discovery identity is
optional. Thanks to Jens Offenbach for reporting.
This commit is contained in:
Florian Schmaus 2014-05-07 12:46:24 +02:00
parent 07d6b9203c
commit 7a5533c823
1 changed files with 1 additions and 1 deletions

View File

@ -327,7 +327,7 @@ public class DiscoverInfo extends IQ implements Cloneable {
xml.halfOpenElement("identity");
xml.xmllangAttribute(lang);
xml.attribute("category", category);
xml.attribute("name", name);
xml.optAttribute("name", name);
xml.optAttribute("type", type);
xml.closeEmptyElement();
return xml;