From b910d026cd3fac6484548c97922e0b6691ab5344 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 16 Feb 2015 14:51:37 +0100 Subject: [PATCH] Remove toString form XMPPException subclasses and getMessage(), to use the implementations in Exception instead. --- .../org/jivesoftware/smack/XMPPException.java | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/XMPPException.java b/smack-core/src/main/java/org/jivesoftware/smack/XMPPException.java index 2656c6890..774ca76ad 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/XMPPException.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/XMPPException.java @@ -129,11 +129,6 @@ public abstract class XMPPException extends Exception { } } - @Override - public String toString() { - return getMessage(); - } - public static void ifHasErrorThenThrow(Stanza packet) throws XMPPErrorException { XMPPError xmppError = packet.getError(); if (xmppError != null) { @@ -157,7 +152,7 @@ public abstract class XMPPException extends Exception { * @param streamError the root cause of the exception. */ public StreamErrorException(StreamError streamError) { - super(); + super(streamError.toString()); this.streamError = streamError; } @@ -171,14 +166,5 @@ public abstract class XMPPException extends Exception { return streamError; } - @Override - public String getMessage() { - return streamError.toString(); - } - - @Override - public String toString() { - return getMessage(); - } } }