cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [1/6] cxf git commit: Allow Boolean objects as properties for the instrumentation manager properties
Date Tue, 07 Apr 2015 20:47:16 GMT
Repository: cxf
Updated Branches:
  refs/heads/master e49894be6 -> c4c969042


Allow Boolean objects as properties for the instrumentation manager properties


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/5bac01e3
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5bac01e3
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5bac01e3

Branch: refs/heads/master
Commit: 5bac01e3595bb33a8c095e9ad1843cbdf8ffd94f
Parents: e49894b
Author: Daniel Kulp <dkulp@apache.org>
Authored: Tue Apr 7 15:02:01 2015 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Tue Apr 7 15:02:01 2015 -0400

----------------------------------------------------------------------
 .../apache/cxf/management/jmx/InstrumentationManagerImpl.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/5bac01e3/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
----------------------------------------------------------------------
diff --git a/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
b/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
index 166379b..6b3bacf 100644
--- a/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
+++ b/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
@@ -410,8 +410,11 @@ public class InstrumentationManagerImpl extends JMXConnectorPolicyType
     }
 
     private static boolean getBusProperty(Bus b, String key, boolean dflt) {
-        String v = (String)b.getProperty(key);
-        return v != null ? Boolean.valueOf(v) : dflt;
+        Object v = b.getProperty(key);
+        if (v instanceof Boolean) {
+            return (Boolean)v;
+        }
+        return v != null ? Boolean.valueOf(v.toString()) : dflt;       
     }
 }
 


Mime
View raw message