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
1 changed files with 5 additions and 0 deletions

View File

@ -264,6 +264,11 @@ public class XMPPError extends AbstractError {
}
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('-', '_');
Condition condition = null;
try {