From 58322365784ab2851541ac0b9baa71bac67d737b Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sat, 5 Apr 2014 18:40:48 +0200 Subject: [PATCH] Cleanup SASLErrorException Reuse the constructor and append only the SASLError String to the Exceptions message (previously the full SASLError stanza was printed). --- .../org/jivesoftware/smack/sasl/SASLErrorException.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/org/jivesoftware/smack/sasl/SASLErrorException.java b/core/src/main/java/org/jivesoftware/smack/sasl/SASLErrorException.java index ebae180b5..460f9ff13 100644 --- a/core/src/main/java/org/jivesoftware/smack/sasl/SASLErrorException.java +++ b/core/src/main/java/org/jivesoftware/smack/sasl/SASLErrorException.java @@ -34,14 +34,11 @@ public class SASLErrorException extends XMPPException { private final Map texts; public SASLErrorException(String mechanism, SASLFailure saslFailure) { - super("SASLError using " + mechanism + ": " + saslFailure); - this.mechanism = mechanism; - this.saslFailure = saslFailure; - this.texts = new HashMap(); + this(mechanism, saslFailure, new HashMap()); } - + public SASLErrorException(String mechanism, SASLFailure saslFailure, Map texts) { - super("SASLError using " + mechanism + ": " + saslFailure); + super("SASLError using " + mechanism + ": " + saslFailure.getSASLErrorString()); this.mechanism = mechanism; this.saslFailure = saslFailure; this.texts = texts;