mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Merge pull request #623 from hamed-sb/master
[core] fix toXml for UnparsedIQ
This commit is contained in:
commit
5633d0e6c2
2 changed files with 23 additions and 1 deletions
|
@ -16,6 +16,8 @@
|
|||
*/
|
||||
package org.jivesoftware.smack.packet;
|
||||
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
|
||||
/**
|
||||
* An IQ stanzas that could not be parsed because no provider was found.
|
||||
*/
|
||||
|
@ -34,7 +36,12 @@ public class UnparsedIQ extends IQ {
|
|||
|
||||
@Override
|
||||
protected IQChildElementXmlStringBuilder getIQChildElementBuilder(IQChildElementXmlStringBuilder xml) {
|
||||
xml.escape(content);
|
||||
if (StringUtils.isEmpty(content)) {
|
||||
xml.setEmptyElement();
|
||||
} else {
|
||||
xml.rightAngleBracket();
|
||||
xml.escape(content);
|
||||
}
|
||||
return xml;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue