activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1420820 - /activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
Date Wed, 12 Dec 2012 16:47:48 GMT
Author: chirino
Date: Wed Dec 12 16:47:47 2012
New Revision: 1420820

URL: http://svn.apache.org/viewvc?rev=1420820&view=rev
Log:
Throw an InvalidDestinationException early on if the topic is null for better JMS compliance.

Modified:
    activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java

Modified: activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java?rev=1420820&r1=1420819&r2=1420820&view=diff
==============================================================================
--- activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
(original)
+++ activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
Wed Dec 12 16:47:47 2012
@@ -1292,6 +1292,10 @@ public class ActiveMQSession implements 
     public TopicSubscriber createDurableSubscriber(Topic topic, String name, String messageSelector,
boolean noLocal) throws JMSException {
         checkClosed();
 
+        if (topic == null) {
+            throw new InvalidDestinationException("Topic cannot be null");
+        }
+
         if (isIndividualAcknowledge()) {
             throw JMSExceptionSupport.create("Cannot create a durable consumer for a Session
in "+
                                              "INDIVIDUAL_ACKNOWLEDGE mode.", null);



Mime
View raw message