Cleanup SASLErrorException

Reuse the constructor and append only the SASLError String to the
Exceptions message (previously the full SASLError stanza was printed).
This commit is contained in:
Florian Schmaus 2014-04-05 18:40:48 +02:00
parent 0c29fdb769
commit 5832236578
1 changed files with 3 additions and 6 deletions

View File

@ -34,14 +34,11 @@ public class SASLErrorException extends XMPPException {
private final Map<String,String> texts;
public SASLErrorException(String mechanism, SASLFailure saslFailure) {
super("SASLError using " + mechanism + ": " + saslFailure);
this.mechanism = mechanism;
this.saslFailure = saslFailure;
this.texts = new HashMap<String, String>();
this(mechanism, saslFailure, new HashMap<String, String>());
}
public SASLErrorException(String mechanism, SASLFailure saslFailure, Map<String,String> texts) {
super("SASLError using " + mechanism + ": " + saslFailure);
super("SASLError using " + mechanism + ": " + saslFailure.getSASLErrorString());
this.mechanism = mechanism;
this.saslFailure = saslFailure;
this.texts = texts;