activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject activemq git commit: Revert "fix up createPublisher contract to throw on null topic param, match the java doc" the java doc allows null for an anonymous publish - the check needs to go in TopicRequestor part of the jdk
Date Fri, 02 Dec 2016 13:58:55 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 59bfffd2b -> 6a0c65828


Revert "fix up createPublisher contract to throw on null topic param, match the java doc"
the java doc allows null for an anonymous publish - the check needs to go in TopicRequestor
part of the jdk

This reverts commit 29ecfd6cdbad76617242ab91be5dd75a14a14425.


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

Branch: refs/heads/master
Commit: 6a0c65828a771cbc57df18707e497590d7a504bd
Parents: 59bfffd
Author: gtully <gary.tully@gmail.com>
Authored: Fri Dec 2 13:57:44 2016 +0000
Committer: gtully <gary.tully@gmail.com>
Committed: Fri Dec 2 13:57:44 2016 +0000

----------------------------------------------------------------------
 .../java/org/apache/activemq/ActiveMQSession.java  |  3 ---
 .../org/apache/activemq/JmsTopicRedeliverTest.java | 17 -----------------
 2 files changed, 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/6a0c6582/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java b/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
index 98484a5..6603a2f 100644
--- a/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
+++ b/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
@@ -1701,9 +1701,6 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession,
Sta
      */
     @Override
     public TopicPublisher createPublisher(Topic topic) throws JMSException {
-        if (topic == null) {
-            throw new InvalidDestinationException("topic is null");
-        }
         checkClosed();
 
         if (topic instanceof CustomDestination) {

http://git-wip-us.apache.org/repos/asf/activemq/blob/6a0c6582/activemq-unit-tests/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java
index c80242c..188e4cd 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java
@@ -17,17 +17,14 @@
 package org.apache.activemq;
 
 import javax.jms.Connection;
-import javax.jms.TopicConnection;
 import javax.jms.Destination;
 import javax.jms.JMSException;
 import javax.jms.Message;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
-import javax.jms.TopicSession;
 import javax.jms.TextMessage;
 import javax.jms.Topic;
-import javax.jms.TopicRequestor;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -153,20 +150,6 @@ public class JmsTopicRedeliverTest extends TestSupport {
         assertNull(consumer.receiveNoWait());
     }
 
-    public void testExOnNullDestToTopicRequestor() throws Exception {
-
-        TopicConnection topicConnection = connectionFactory.createTopicConnection();
-        TopicSession topicSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-        try {
-            TopicRequestor topicRequestor = new TopicRequestor(topicSession, null);
-            fail("Expect ex on invalid dest");
-        } catch (javax.jms.InvalidDestinationException expected) {
-        } finally {
-            topicConnection.close();
-        }
-    }
-
-
     protected MessageConsumer createConsumer() throws JMSException {
         if (durable) {
             LOG.info("Creating durable consumer");


Mime
View raw message