tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1417226 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/modeler/Util.java
Date Tue, 04 Dec 2012 22:32:09 GMT
Author: kkolinko
Date: Tue Dec  4 22:32:09 2012
New Revision: 1417226

URL: http://svn.apache.org/viewvc?rev=1417226&view=rev
Log:
Merged revision 1417224 from tomcat/trunk:
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/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/Util.java

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1417224

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/Util.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/Util.java?rev=1417226&r1=1417225&r2=1417226&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/Util.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/modeler/Util.java Tue Dec  4 22:32:09
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