diff options
-rw-r--r-- | java/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java b/java/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java index fa69f7f91b..f2503e549f 100644 --- a/java/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java +++ b/java/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java @@ -18,12 +18,9 @@ * under the License. * */ - package org.apache.qpid; -import java.util.ArrayList; import java.util.Collection; -import java.util.Iterator; import org.apache.qpid.protocol.AMQConstant; @@ -43,7 +40,7 @@ public class AMQConnectionFailureException extends AMQException public AMQConnectionFailureException(String message, Throwable cause) { - super(null, message, cause); + super(cause instanceof AMQException ? ((AMQException) cause).getErrorCode() : null, message, cause); } public AMQConnectionFailureException(AMQConstant errorCode, String message, Throwable cause) |