From 2df306cc7ad07b78a3ff9f2db1599a6f9297bf99 Mon Sep 17 00:00:00 2001 From: "Adrian T. Co" Date: Thu, 16 Nov 2006 20:01:00 +0000 Subject: [PATCH] https://issues.apache.org/activemq/browse/AMQ-1050 Fix bug in query when using the format -QTopic=*, -QQueue=*, etc. git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@475901 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/console/command/QueryCommand.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/activemq-console/src/main/java/org/apache/activemq/console/command/QueryCommand.java b/activemq-console/src/main/java/org/apache/activemq/console/command/QueryCommand.java index de4d13ffb9..c3bc70212f 100644 --- a/activemq-console/src/main/java/org/apache/activemq/console/command/QueryCommand.java +++ b/activemq-console/src/main/java/org/apache/activemq/console/command/QueryCommand.java @@ -94,7 +94,10 @@ public class QueryCommand extends AbstractJmxCommand { return; } String queryStr = JmxMBeansUtil.createQueryString(predefQuery, value); - queryAddObjects.add(queryStr); + StringTokenizer queryTokens = new StringTokenizer(queryStr, COMMAND_OPTION_DELIMETER); + while (queryTokens.hasMoreTokens()) { + queryAddObjects.add(queryTokens.nextToken()); + } } // If token is a substractive predefined query define option @@ -114,7 +117,10 @@ public class QueryCommand extends AbstractJmxCommand { return; } String queryStr = JmxMBeansUtil.createQueryString(predefQuery, value); - querySubObjects.add(queryStr); + StringTokenizer queryTokens = new StringTokenizer(queryStr, COMMAND_OPTION_DELIMETER); + while (queryTokens.hasMoreTokens()) { + querySubObjects.add(queryTokens.nextToken()); + } } // If token is an additive object name query option