Quantcast
Channel: Ignite Realtime: Message List
Viewing all articles
Browse latest Browse all 11593

Smack-4.1.0-rc2: XMPPError does not include conditionText in toXML()

$
0
0

The PacketParserUtils is now able to parse the condition text e.g. in a redirect error response. However the opposite is still missing: XMPPError.toXML() does not include the conditionText in the produced XML String:

public XmlStringBuilder toXML() {    XmlStringBuilder xml = new XmlStringBuilder();    xml.halfOpenElement(ERROR);    xml.attribute("type", type.toString());    xml.optAttribute("by", errorGenerator);    xml.rightAngleBracket();    xml.halfOpenElement(condition.toString());    xml.xmlnsAttribute(NAMESPACE);
// here I would insert:    if (conditionText != null) {        xml.rightAngleBracket();        xml.escape(conditionText);        xml.closeElement(condition.toString());    } else {        xml.closeEmptyElement();    }
// then continue with    addDescriptiveTextsAndExtensions(xml);    xml.closeElement(ERROR);    return xml;
}

 

Martin


Viewing all articles
Browse latest Browse all 11593

Trending Articles