activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r775305 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs
Date Fri, 15 May 2009 20:05:12 GMT
Author: tabish
Date: Fri May 15 20:05:12 2009
New Revision: 775305

URL: http://svn.apache.org/viewvc?rev=775305&view=rev
Log:
fix for https://issues.apache.org/activemq/browse/AMQNET-161

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs?rev=775305&r1=775304&r2=775305&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs Fri May
15 20:05:12 2009
@@ -239,6 +239,11 @@
 
 		public IMessageConsumer CreateConsumer(IDestination destination, string selector, bool
noLocal)
 		{
+            if (destination == null)
+            {
+                throw new InvalidDestinationException("Cannot create a Consumer with a Null
destination");
+            }
+
 			ConsumerInfo command = CreateConsumerInfo(destination, selector);
 			command.NoLocal = noLocal;
 			command.AcknowledgementMode = this.AcknowledgementMode;
@@ -267,7 +272,12 @@
 
 		public IMessageConsumer CreateDurableConsumer(ITopic destination, string name, string selector,
bool noLocal)
 		{
-			ConsumerInfo command = CreateConsumerInfo(destination, selector);
+            if (destination == null)
+            {
+                throw new InvalidDestinationException("Cannot create a Consumer with a Null
destination");
+            }
+            
+            ConsumerInfo command = CreateConsumerInfo(destination, selector);
 			ConsumerId consumerId = command.ConsumerId;
 			command.SubscriptionName = name;
 			command.NoLocal = noLocal;



Mime
View raw message