1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-22 10:37:59 +01:00

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

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;