Author: tabish
Date: Wed Mar 18 14:34:02 2009
New Revision: 755604

URL: http://svn.apache.org/viewvc?rev=755604&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQCPP-229

Modified:
    
activemq/activemq-cpp/branches/activemq-cpp-2.x/src/main/activemq/core/ActiveMQSession.cpp

Modified: 
activemq/activemq-cpp/branches/activemq-cpp-2.x/src/main/activemq/core/ActiveMQSession.cpp
URL: 
http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-2.x/src/main/activemq/core/ActiveMQSession.cpp?rev=755604&r1=755603&r2=755604&view=diff
==============================================================================
--- 
activemq/activemq-cpp/branches/activemq-cpp-2.x/src/main/activemq/core/ActiveMQSession.cpp
 (original)
+++ 
activemq/activemq-cpp/branches/activemq-cpp-2.x/src/main/activemq/core/ActiveMQSession.cpp
 Wed Mar 18 14:34:02 2009
@@ -371,6 +371,12 @@
                 "ActiveMQSession::createQueue - Session Already Closed" );
         }
 
+        if( queueName == "" ) {
+            throw ActiveMQException(
+                __FILE__, __LINE__,
+                "ActiveMQSession::createQueue - Destination name cannot be 
empty.");
+        }
+
         cms::Queue* queue = connection->getConnectionData()->
             getConnector()->createQueue( queueName, sessionInfo );
 
@@ -397,6 +403,12 @@
                 "ActiveMQSession::createTopic - Session Already Closed");
         }
 
+        if( topicName == "" ) {
+            throw ActiveMQException(
+                __FILE__, __LINE__,
+                "ActiveMQSession::createTopic - Destination name cannot be 
empty.");
+        }
+
         cms::Topic* topic = connection->getConnectionData()->
             getConnector()->createTopic( topicName, sessionInfo );
 


Reply via email to