[hornetq-commits] JBoss hornetq SVN: r8908 - trunk/src/main/org/hornetq/jms/client.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Mar 1 10:09:57 EST 2010


Author: jmesnil
Date: 2010-03-01 10:09:56 -0500 (Mon, 01 Mar 2010)
New Revision: 8908

Modified:
   trunk/src/main/org/hornetq/jms/client/HornetQMessageProducer.java
Log:
fix send exception

* if the destination is not correct, throw a UnsupportedOperationException

Modified: trunk/src/main/org/hornetq/jms/client/HornetQMessageProducer.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQMessageProducer.java	2010-03-01 14:00:10 UTC (rev 8907)
+++ trunk/src/main/org/hornetq/jms/client/HornetQMessageProducer.java	2010-03-01 15:09:56 UTC (rev 8908)
@@ -347,7 +347,7 @@
       {
          if (defaultDestination == null)
          {
-            throw new InvalidDestinationException("Destination must be specified on send with an anonymous producer");
+            throw new UnsupportedOperationException("Destination must be specified on send with an anonymous producer");
          }
 
          destination = defaultDestination;
@@ -358,7 +358,7 @@
          {
             if (!destination.equals(defaultDestination))
             {
-               throw new JMSException("Where a default destination is specified " + "for the sender and a destination is "
+               throw new UnsupportedOperationException("Where a default destination is specified " + "for the sender and a destination is "
                                       + "specified in the arguments to the send, "
                                       + "these destinations must be equal");
             }



More information about the hornetq-commits mailing list