1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 14:22:05 +01:00

Parse xml-not-well-formed as not-well-formed

for backwards compatibility.

SMACK-400
This commit is contained in:
Florian Schmaus 2015-01-12 13:43:35 +01:00
parent 47ced860ec
commit 1d83db898e

View file

@ -264,6 +264,11 @@ public class XMPPError extends AbstractError {
} }
public static Condition fromString(String string) { public static Condition fromString(String string) {
// Backwards compatibility for older implementations still using RFC 3920. RFC 6120
// changed 'xml-not-well-formed' to 'not-well-formed'.
if ("xml-not-well-formed".equals(string)) {
string = "not-well-formed";
}
string = string.replace('-', '_'); string = string.replace('-', '_');
Condition condition = null; Condition condition = null;
try { try {