You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2011/03/04 18:18:52 UTC

svn commit: r1078061 - in /qpid/branches/0.10/qpid/java/management/eclipse-plugin: ./ src/ src/main/java/org/apache/qpid/management/ui/model/NotificationObject.java

Author: robbie
Date: Fri Mar  4 17:18:52 2011
New Revision: 1078061

URL: http://svn.apache.org/viewvc?rev=1078061&view=rev
Log:
QPID-3110: unquote the key values for recieved Notifications to ensure they align with unquoted names used elsewhere in the console

Merged from trunk r1077869.

Modified:
    qpid/branches/0.10/qpid/java/management/eclipse-plugin/   (props changed)
    qpid/branches/0.10/qpid/java/management/eclipse-plugin/src/   (props changed)
    qpid/branches/0.10/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/NotificationObject.java

Propchange: qpid/branches/0.10/qpid/java/management/eclipse-plugin/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Mar  4 17:18:52 2011
@@ -0,0 +1,7 @@
+/qpid/branches/0.5.x-dev/management/eclipse-plugin:886720-886722
+/qpid/branches/0.5.x-dev/qpid/java/management/eclipse-plugin:886720-886722,887145,892761,894875,916304,916325,930288,931179
+/qpid/branches/java-broker-0-10/qpid/java/management/eclipse-plugin:795950-829653
+/qpid/branches/java-network-refactor/qpid/java/management/eclipse-plugin:805429-821809
+/qpid/branches/qpid-2935/qpid/java/management/eclipse-plugin:1061302-1072333
+/qpid/trunk/qpid/java/management/eclipse-plugin:1077869
+/qpid/trunk/qpid/management/eclipse-plugin:796646-796653

Propchange: qpid/branches/0.10/qpid/java/management/eclipse-plugin/src/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Mar  4 17:18:52 2011
@@ -2,3 +2,4 @@
 /qpid/branches/java-network-refactor/qpid/java/management/eclipse-plugin/src:805429-821809
 /qpid/branches/jmx_mc_gsoc09/qpid/java/management/eclipse-plugin/src:788755
 /qpid/branches/qpid-2935/qpid/java/management/eclipse-plugin/src:1061302-1072333
+/qpid/trunk/qpid/java/management/eclipse-plugin/src:1077869

Modified: qpid/branches/0.10/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/NotificationObject.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.10/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/NotificationObject.java?rev=1078061&r1=1078060&r2=1078061&view=diff
==============================================================================
--- qpid/branches/0.10/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/NotificationObject.java (original)
+++ qpid/branches/0.10/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/NotificationObject.java Fri Mar  4 17:18:52 2011
@@ -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;



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org