summaryrefslogtreecommitdiff
path: root/java/broker
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2008-07-15 11:35:54 +0000
committerMartin Ritchie <ritchiem@apache.org>2008-07-15 11:35:54 +0000
commit5c732b199e21e34d942bbbadca3c25e1fcf6b101 (patch)
tree2cc9f301cc22a3a8e88e4b2efd39acfa025c5bd5 /java/broker
parentcd204dcc2a3eb8e040c4f41f77d71e391b24594d (diff)
downloadqpid-python-5c732b199e21e34d942bbbadca3c25e1fcf6b101.tar.gz
QPID-1175 : VirtualHost now validates that name is non-null and non-empty. Full protocol validation of the virtualhost name has not been performed.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@676883 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker')
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java b/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
index 977bd84491..b25a56344e 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
@@ -149,6 +149,11 @@ public class VirtualHost implements Accessable
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();