From 2caae48af88d3070f9ca08b2b0b61bff71b28c18 Mon Sep 17 00:00:00 2001 From: Robert Gemmell Date: Tue, 1 Mar 2011 09:34:53 +0000 Subject: QPID-3090: quote the MBean ObjectName key values for the names of Queues, Connections, Exchanges, and VirtualHosts instead of just remapping characters. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1075744 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/qpid/test/utils/JMXTestUtils.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'qpid/java/systests/src') diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/JMXTestUtils.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/JMXTestUtils.java index ff80c91fac..3fece2130a 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/JMXTestUtils.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/JMXTestUtils.java @@ -232,7 +232,8 @@ public class JMXTestUtils { // Get the name of the test manager AllObjects allObject = new AllObjects(_mbsc); - allObject.querystring = "org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost=" + vhostName + ",*"; + allObject.querystring = "org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost=" + + ObjectName.quote(vhostName) + ",*"; Set objectNames = allObject.returnObjects(); @@ -259,7 +260,9 @@ public class JMXTestUtils { // Get the name of the test manager AllObjects allObject = new AllObjects(_mbsc); - allObject.querystring = "org.apache.qpid:type=VirtualHost.Queue,VirtualHost=" + virtualHostName + ",name=" + queue + ",*"; + allObject.querystring = "org.apache.qpid:type=VirtualHost.Queue,VirtualHost=" + + ObjectName.quote(virtualHostName) + ",name=" + + ObjectName.quote(queue) + ",*"; Set objectNames = allObject.returnObjects(); @@ -287,7 +290,9 @@ public class JMXTestUtils { // Get the name of the test manager AllObjects allObject = new AllObjects(_mbsc); - allObject.querystring = "org.apache.qpid:type=VirtualHost.Exchange,VirtualHost=" + virtualHostName + ",name=" + exchange + ",*"; + allObject.querystring = "org.apache.qpid:type=VirtualHost.Exchange,VirtualHost=" + + ObjectName.quote(virtualHostName) + ",name=" + + ObjectName.quote(exchange) + ",*"; Set objectNames = allObject.returnObjects(); -- cgit v1.2.1