1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-26 22:27:58 +01:00

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

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;