mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 10:37:59 +01:00
[core] Use Enum.toString() in XmlStringBuilder.attribute(String, Enum<?>)
All other enum-using methods of XmlStringBuilder already use Enum.toString(), as opposed to Enum.name(), this was the only left. I do not remember why I did not to change this method too, probably because of its plenty call sites. But since this method already broke Jingle XML serializaton, JingleAction was e.g., 'session_accept' when it should be 'session-accept', we change it now. Fixes SMACK-921.
This commit is contained in:
parent
1a727c152e
commit
1dae0c0c32
1 changed files with 1 additions and 2 deletions
|
@ -289,8 +289,7 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element {
|
|||
|
||||
public XmlStringBuilder attribute(String name, Enum<?> value) {
|
||||
assert value != null;
|
||||
// TODO: Should use toString() instead of name().
|
||||
attribute(name, value.name());
|
||||
attribute(name, value.toString());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue