You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2014/01/24 14:31:57 UTC

git commit: https://issues.apache.org/jira/browse/AMQ-4991 - fix npe and reinstate test

Updated Branches:
  refs/heads/trunk 770539d53 -> 95d20e5b4


https://issues.apache.org/jira/browse/AMQ-4991 - fix npe and reinstate test


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

Branch: refs/heads/trunk
Commit: 95d20e5b47aeb179493fba5b1f40df9f237538db
Parents: 770539d
Author: gtully <ga...@gmail.com>
Authored: Fri Jan 24 13:31:44 2014 +0000
Committer: gtully <ga...@gmail.com>
Committed: Fri Jan 24 13:31:44 2014 +0000

----------------------------------------------------------------------
 .../java/org/apache/activemq/jms/pool/PooledProducer.java     | 2 +-
 .../JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java  | 7 -------
 2 files changed, 1 insertion(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/95d20e5b/activemq-jms-pool/src/main/java/org/apache/activemq/jms/pool/PooledProducer.java
----------------------------------------------------------------------
diff --git a/activemq-jms-pool/src/main/java/org/apache/activemq/jms/pool/PooledProducer.java b/activemq-jms-pool/src/main/java/org/apache/activemq/jms/pool/PooledProducer.java
index 7f54b99..175f74d 100644
--- a/activemq-jms-pool/src/main/java/org/apache/activemq/jms/pool/PooledProducer.java
+++ b/activemq-jms-pool/src/main/java/org/apache/activemq/jms/pool/PooledProducer.java
@@ -86,7 +86,7 @@ public class PooledProducer implements MessageProducer {
         // just in case let only one thread send at once
         synchronized (messageProducer) {
 
-            if (anonymous && !this.destination.equals(destination)) {
+            if (anonymous && this.destination != null && !this.destination.equals(destination)) {
                 throw new UnsupportedOperationException("This producer can only send messages to: " + this.destination);
             }
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/95d20e5b/activemq-unit-tests/src/test/java/org/apache/activemq/pool/JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/pool/JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/pool/JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java
index 4d00415..05ba177 100755
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/pool/JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/pool/JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java
@@ -44,11 +44,4 @@ public class JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest extends JmsTopi
         super.tearDown();
         senderConnectionFactory.stop();
     }
-
-    @Override   // TODO remove this method when AMQ-4991 is fixed
-    @Ignore("See AMQ-4991") // Ignore doesn't really work here with JUnit3 runner, just adding as documentation
-    public void testSendReceive() throws Exception {
-        //super.testSendReceive();
-    }
-
 }