tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1417224 - /tomcat/trunk/java/org/apache/tomcat/util/modeler/Util.java
Date Tue, 04 Dec 2012 22:29:36 GMT
Author: kkolinko
Date: Tue Dec  4 22:29:35 2012
New Revision: 1417224

URL: http://svn.apache.org/viewvc?rev=1417224&view=rev
Log:
Review of r1412576, which was a fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=54170
Reduce GC. There is no need to copy characters into a new char[] array here.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/modeler/Util.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/Util.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/Util.java?rev=1417224&r1=1417223&r2=1417224&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/Util.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/Util.java Tue Dec  4 22:29:35 2012
@@ -23,9 +23,8 @@ public class Util {
     }
 
     public static boolean objectNameValueNeedsQuote(String input) {
-        char[] chars = input.toCharArray();
         for (int i = 0; i < input.length(); i++) {
-            char ch = chars[i];
+            char ch = input.charAt(i);
             if (ch == ',' || ch == '=' || ch == ':' || ch == '*' || ch == '?') {
                 return true;
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message