From 1d83db898ec58ffba87251df640dabcb18330ad1 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 12 Jan 2015 13:43:35 +0100 Subject: [PATCH] Parse xml-not-well-formed as not-well-formed for backwards compatibility. SMACK-400 --- .../main/java/org/jivesoftware/smack/packet/XMPPError.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/packet/XMPPError.java b/smack-core/src/main/java/org/jivesoftware/smack/packet/XMPPError.java index 1400f06fc..360d0d06d 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/packet/XMPPError.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/packet/XMPPError.java @@ -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 {