From 199311eda16b7b6a3457129fe0f1585bb6289293 Mon Sep 17 00:00:00 2001 From: Ingo Bauersachs Date: Sat, 5 Aug 2017 17:05:40 +0200 Subject: [PATCH] Fix error Condition to Type mappings to match RFC 6120 Synchronize the Javadoc table to match the actual implementation. --- .../org/jivesoftware/smack/packet/XMPPError.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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 3913fe374..fc96cbbfa 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 @@ -39,14 +39,14 @@ import org.jivesoftware.smack.util.XmlStringBuilder; * conflictCANCEL8.3.3.2 * feature-not-implementedCANCEL8.3.3.3 * forbiddenAUTH8.3.3.4 - * goneMODIFY8.3.3.5 + * goneCANCEL8.3.3.5 * internal-server-errorWAIT8.3.3.6 * item-not-foundCANCEL8.3.3.7 * jid-malformedMODIFY8.3.3.8 - * not-acceptable MODIFY8.3.3.9 + * not-acceptableMODIFY8.3.3.9 * not-allowedCANCEL8.3.3.10 * not-authorizedAUTH8.3.3.11 - * policy-violationAUTH8.3.3.12 + * policy-violationMODIFY8.3.3.12 * recipient-unavailableWAIT8.3.3.13 * redirectMODIFY8.3.3.14 * registration-requiredAUTH8.3.3.15 @@ -55,7 +55,7 @@ import org.jivesoftware.smack.util.XmlStringBuilder; * resource-constraintWAIT8.3.3.18 * service-unavailableCANCEL8.3.3.19 * subscription-requiredAUTH8.3.3.20 - * undefined-conditionWAIT8.3.3.21 + * undefined-conditionMODIFY8.3.3.21 * unexpected-requestWAIT8.3.3.22 * * @@ -91,9 +91,10 @@ public class XMPPError extends AbstractError { CONDITION_TO_TYPE.put(Condition.remote_server_not_found, Type.CANCEL); CONDITION_TO_TYPE.put(Condition.remote_server_timeout, Type.WAIT); CONDITION_TO_TYPE.put(Condition.resource_constraint, Type.WAIT); - CONDITION_TO_TYPE.put(Condition.service_unavailable, Type.WAIT); - CONDITION_TO_TYPE.put(Condition.subscription_required, Type.WAIT); - CONDITION_TO_TYPE.put(Condition.unexpected_request, Type.MODIFY); + CONDITION_TO_TYPE.put(Condition.service_unavailable, Type.CANCEL); + CONDITION_TO_TYPE.put(Condition.subscription_required, Type.AUTH); + CONDITION_TO_TYPE.put(Condition.undefined_condition, Type.MODIFY); + CONDITION_TO_TYPE.put(Condition.unexpected_request, Type.WAIT); } private final Condition condition;