activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r812872 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java
Date Wed, 09 Sep 2009 10:11:16 GMT
Author: gtully
Date: Wed Sep  9 10:11:16 2009
New Revision: 812872

URL: http://svn.apache.org/viewvc?rev=812872&view=rev
Log:
resolve potential npe in test

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java?rev=812872&r1=812871&r2=812872&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java
Wed Sep  9 10:11:16 2009
@@ -104,7 +104,9 @@
         TextMessage msg;
         for (int idx = 0; idx < 10; ++idx) {
             msg = (TextMessage) consumer.receive(1000);
-            msg.acknowledge();
+            if (msg != null) {
+                msg.acknowledge();
+            }
         }
         keepGoing.set(false);
     }



Mime
View raw message