diff options
| author | Robert Gemmell <robbie@apache.org> | 2011-03-04 11:01:13 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2011-03-04 11:01:13 +0000 |
| commit | d876f9218df3d934a059a3d18b6b23894c534e25 (patch) | |
| tree | 258a0ea07c0232ec07da40333ee6ba6d3629a031 /java/management | |
| parent | 8b6a5820667b77db1b35cc22267a742d7677aa13 (diff) | |
| download | qpid-python-d876f9218df3d934a059a3d18b6b23894c534e25.tar.gz | |
QPID-3110: unquote the key values for recieved Notifications to ensure they align with unquoted names used elsewhere in the console
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1077869 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/management')
| -rw-r--r-- | java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/NotificationObject.java | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/NotificationObject.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/NotificationObject.java index e42b3c53b6..35cc9f6e27 100644 --- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/NotificationObject.java +++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/NotificationObject.java @@ -61,7 +61,7 @@ public class NotificationObject { if (_source instanceof ObjectName) { - return ((ObjectName)_source).getKeyProperty("name"); + return unquote(((ObjectName)_source).getKeyProperty("name")); } return null; @@ -71,12 +71,31 @@ public class NotificationObject { if (_source instanceof ObjectName) { - return ((ObjectName)_source).getKeyProperty(VIRTUAL_HOST); + return unquote(((ObjectName)_source).getKeyProperty(VIRTUAL_HOST)); } return null; } - + + private String unquote(String value) + { + if(value != null) + { + try + { + //if the value is quoted in the ObjectName, unquote it + value = ObjectName.unquote(value); + } + catch(IllegalArgumentException e) + { + //ignore, this just means the value is not quoted + //and can be left unchanged + } + } + + return value; + } + public String getMessage() { return _message; |
