1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-25 07:42:06 +01:00

Fix ConcurrentModificationException in XmlStringBuilder.appendToXml()

We want to append to appendable, not sb, the LazyStringBuilder we are
currently iterating over,
This commit is contained in:
Florian Schmaus 2019-09-18 08:48:39 +02:00
parent afd61670a4
commit fb3a71a14d

View file

@ -646,7 +646,7 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element {
else if (csq instanceof XmlNsAttribute) {
XmlNsAttribute xmlNsAttribute = (XmlNsAttribute) csq;
if (!xmlNsAttribute.value.equals(enclosingXmlEnvironment.getEffectiveNamespace())) {
sb.append(xmlNsAttribute);
appendable.append(xmlNsAttribute);
enclosingXmlEnvironment = new XmlEnvironment(xmlNsAttribute.value);
}
}