activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [3/5] activemq-artemis git commit: Fix NPE in management test
Date Mon, 03 Aug 2015 12:24:46 GMT
Fix NPE in management test


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/ecc2cecf
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/ecc2cecf
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/ecc2cecf

Branch: refs/heads/master
Commit: ecc2cecf87e6f529a9afef96795b78d13c530332
Parents: 5e2a405
Author: jbertram <jbertram@apache.org>
Authored: Thu Jul 30 10:35:20 2015 -0500
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Mon Aug 3 08:24:28 2015 -0400

----------------------------------------------------------------------
 .../integration/management/CoreMessagingProxy.java     | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ecc2cecf/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/CoreMessagingProxy.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/CoreMessagingProxy.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/CoreMessagingProxy.java
index fdd446a..1f13b20 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/CoreMessagingProxy.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/CoreMessagingProxy.java
@@ -94,13 +94,20 @@ public class CoreMessagingProxy
       ClientMessage m = session.createMessage(false);
       ManagementHelper.putOperationInvocation(m, resourceName, operationName, args);
       ClientMessage reply = requestor.request(m);
-      if (ManagementHelper.hasOperationSucceeded(reply))
+      if (reply != null)
       {
-         return ManagementHelper.getResult(reply);
+         if (ManagementHelper.hasOperationSucceeded(reply))
+         {
+            return ManagementHelper.getResult(reply);
+         }
+         else
+         {
+            throw new Exception((String) ManagementHelper.getResult(reply));
+         }
       }
       else
       {
-         throw new Exception((String)ManagementHelper.getResult(reply));
+         return null;
       }
    }
 


Mime
View raw message