cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1080445 - in /cxf/branches/2.3.x-fixes: ./ rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
Date Fri, 11 Mar 2011 04:37:31 GMT
Author: dkulp
Date: Fri Mar 11 04:37:31 2011
New Revision: 1080445

URL: http://svn.apache.org/viewvc?rev=1080445&view=rev
Log:
Merged revisions 1080437 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1080437 | dkulp | 2011-03-10 23:24:13 -0500 (Thu, 10 Mar 2011) | 2 lines
  
  [CXF-3360] Performance improvement
  Patch from Xiaoming Shi applied
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.3.x-fixes/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java?rev=1080445&r1=1080444&r2=1080445&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
Fri Mar 11 04:37:31 2011
@@ -305,16 +305,23 @@ public class InstrumentationManagerImpl 
     }
     
     private String sanitize(String in) {
-        String result = null;
-        if (in != null) {
-            result = in.replace(':', '_');
-            result = result.replace('/', '_');
-            result = result.replace('\\', '_');
-            result = result.replace('?', '_');
-            result = result.replace('=', '_');
-            result = result.replace(',', '_');
+        StringBuilder str = new StringBuilder(in.length());
+        for (int x = 0; x < str.length(); x++) {
+            char ch = str.charAt(x);
+            switch (ch) {
+            case ':':
+            case '/':
+            case '\\':
+            case '?':
+            case '=':
+            case ',':
+                str.append('_');
+                break;
+            default:
+                str.append(ch);
+            }
         }
-        return result;
+        return str.toString();
     }
 }
 



Mime
View raw message