From 270e378287480dd6382113bdac76dc702ff0fcd4 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sat, 7 Apr 2018 23:10:58 +0200 Subject: [PATCH] Fix StreamManagement.Failed.toXML() Note that this method is currently not used by Smack, as XMPP clients usually do not emit that Nonza. --- .../org/jivesoftware/smack/sm/packet/StreamManagement.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/sm/packet/StreamManagement.java b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/packet/StreamManagement.java index d1585b4a6..da7e496cf 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/sm/packet/StreamManagement.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/packet/StreamManagement.java @@ -225,10 +225,11 @@ public class StreamManagement { if (condition == null && textElements.isEmpty()) { xml.closeEmptyElement(); } else { - xml.rightAngleBracket(); if (condition != null) { + xml.rightAngleBracket(); xml.append(condition.toString()); xml.xmlnsAttribute(StanzaError.NAMESPACE); + xml.closeEmptyElement(); } xml.append(textElements); xml.closeElement(ELEMENT);