You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2016/11/15 07:25:24 UTC
svn commit: r1769741 -
/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
Author: kwall
Date: Tue Nov 15 07:25:24 2016
New Revision: 1769741
URL: http://svn.apache.org/viewvc?rev=1769741&view=rev
Log:
QPID-7507: [Java Client] Prevent AMQSession_0_10#isQueueExist() failing with NPE if AMQP times-out
Modified:
qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java?rev=1769741&r1=1769740&r2=1769741&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java Tue Nov 15 07:25:24 2016
@@ -1159,15 +1159,23 @@ public class AMQSession_0_10 extends AMQ
}
catch(SessionException e)
{
- if (e.getException().getErrorCode() == ExecutionErrorCode.RESOURCE_DELETED
- || e.getException().getErrorCode() == ExecutionErrorCode.NOT_FOUND)
+ final ExecutionException underlying = e.getException();
+ if (underlying == null)
{
- match = false;
+ throw new QpidException("Error querying queue", e);
}
else
{
- throw new AMQException(AMQConstant.getConstant(e.getException().getErrorCode().getValue()),
- "Error querying queue",e);
+ if (underlying.getErrorCode() == ExecutionErrorCode.RESOURCE_DELETED
+ || underlying.getErrorCode() == ExecutionErrorCode.NOT_FOUND)
+ {
+ match = false;
+ }
+ else
+ {
+ throw new AMQException(AMQConstant.getConstant(underlying.getErrorCode().getValue()),
+ "Error querying queue", e);
+ }
}
}
return match;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org