qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ritch...@apache.org
Subject svn commit: r676883 - in /incubator/qpid/trunk/qpid/java: broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java systests/src/main/java/org/apache/qpid/server/ack/TxAckTest.java
Date Tue, 15 Jul 2008 11:35:55 GMT
Author: ritchiem
Date: Tue Jul 15 04:35:54 2008
New Revision: 676883

URL: http://svn.apache.org/viewvc?rev=676883&view=rev
Log:
QPID-1175 : VirtualHost now validates that name is non-null and non-empty. Full protocol validation
of the virtualhost name has not been performed.

Modified:
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
    incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/ack/TxAckTest.java

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java?rev=676883&r1=676882&r2=676883&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
Tue Jul 15 04:35:54 2008
@@ -149,6 +149,11 @@
 
     public VirtualHost(String name, Configuration hostConfig, MessageStore store) throws
Exception
     {
+        if (name == null || name.length() == 0)
+        {
+            throw new IllegalArgumentException("Illegal name (" + name + ") for virtualhost.");
+        }
+
         _name = name;
 
         _virtualHostMBean = new VirtualHostMBean();

Modified: incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/ack/TxAckTest.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/ack/TxAckTest.java?rev=676883&r1=676882&r2=676883&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/ack/TxAckTest.java
(original)
+++ incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/ack/TxAckTest.java
Tue Jul 15 04:35:54 2008
@@ -110,7 +110,7 @@
                                                                           new LinkedList<RequiredDeliveryException>()
             );
             AMQQueue queue =
-                    AMQQueueFactory.createAMQQueueImpl(new AMQShortString("test"), false,
null, false, new VirtualHost("", new MemoryMessageStore()),
+                    AMQQueueFactory.createAMQQueueImpl(new AMQShortString("test"), false,
null, false, new VirtualHost("test", new MemoryMessageStore()),
                                                        null);
 
             for (int i = 0; i < messageCount; i++)



Mime
View raw message