Remove toString form XMPPException subclasses

and getMessage(), to use the implementations in Exception instead.
This commit is contained in:
Florian Schmaus 2015-02-16 14:51:37 +01:00
parent 1577fa1fca
commit b910d026cd
1 changed files with 1 additions and 15 deletions

View File

@ -129,11 +129,6 @@ public abstract class XMPPException extends Exception {
} }
} }
@Override
public String toString() {
return getMessage();
}
public static void ifHasErrorThenThrow(Stanza packet) throws XMPPErrorException { public static void ifHasErrorThenThrow(Stanza packet) throws XMPPErrorException {
XMPPError xmppError = packet.getError(); XMPPError xmppError = packet.getError();
if (xmppError != null) { if (xmppError != null) {
@ -157,7 +152,7 @@ public abstract class XMPPException extends Exception {
* @param streamError the root cause of the exception. * @param streamError the root cause of the exception.
*/ */
public StreamErrorException(StreamError streamError) { public StreamErrorException(StreamError streamError) {
super(); super(streamError.toString());
this.streamError = streamError; this.streamError = streamError;
} }
@ -171,14 +166,5 @@ public abstract class XMPPException extends Exception {
return streamError; return streamError;
} }
@Override
public String getMessage() {
return streamError.toString();
}
@Override
public String toString() {
return getMessage();
}
} }
} }