From 12cbeede57c195042111b000d41277b3fd3b8be5 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sat, 3 Aug 2019 22:15:44 +0200 Subject: [PATCH] Use Enum.toString() in XmlStringBuilder.element(String, Enum) as toString() is often overriden by Enums to yield the expected XMPP wire protocol representation. --- .../main/java/org/jivesoftware/smack/util/XmlStringBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java b/smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java index 56e6eb177..4f0b93680 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java @@ -112,7 +112,7 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element { public XmlStringBuilder element(String name, Enum content) { assert content != null; - element(name, content.name()); + element(name, content.toString()); return this; }