diff options
-rw-r--r-- | qpid/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/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/NotificationObject.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/NotificationObject.java index e42b3c53b6..35cc9f6e27 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/NotificationObject.java +++ b/qpid/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; |