activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/3] activemq-6 git commit: avoid potential NPE
Date Mon, 02 Feb 2015 15:31:51 GMT
avoid potential NPE


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

Branch: refs/heads/master
Commit: fe11fb4c02e3fc0492191224b366df878329e809
Parents: 9e214e9
Author: jbertram <jbertram@redhat.com>
Authored: Fri Jan 30 13:35:16 2015 -0600
Committer: jbertram <jbertram@redhat.com>
Committed: Fri Jan 30 13:35:28 2015 -0600

----------------------------------------------------------------------
 .../integration/cluster/distribution/ClusterTestBase.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-6/blob/fe11fb4c/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/ClusterTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/ClusterTestBase.java
b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/ClusterTestBase.java
index 9c4d118..7370f33 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/ClusterTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/ClusterTestBase.java
@@ -1201,16 +1201,16 @@ public abstract class ClusterTestBase extends ServiceTestBase
 
             ClientMessage message = holder.consumer.receive(WAIT_TIMEOUT);
 
-            message.acknowledge();
-
-            consumers[consumerIDs[count]].session.commit();
-
             Assert.assertNotNull("consumer " + consumerIDs[count] + " did not receive message
" + i, message);
 
             Assert.assertEquals("consumer " + consumerIDs[count] + " message " + i,
                                 i,
                                 message.getObjectProperty(ClusterTestBase.COUNT_PROP));
 
+            message.acknowledge();
+
+            consumers[consumerIDs[count]].session.commit();
+
          }
 
          count++;


Mime
View raw message