tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r832019 - in /tomcat/trunk/java/org/apache/catalina/ssi: ExpressionParseTree.java SSIFsize.java SSIMediator.java SSIProcessor.java SSIServletExternalResolver.java
Date Mon, 02 Nov 2009 18:35:52 GMT
Author: markt
Date: Mon Nov  2 18:35:52 2009
New Revision: 832019

URL: http://svn.apache.org/viewvc?rev=832019&view=rev
Log:
StringBuffer -> StringBuilder for o.a.c.ssi

Modified:
    tomcat/trunk/java/org/apache/catalina/ssi/ExpressionParseTree.java
    tomcat/trunk/java/org/apache/catalina/ssi/SSIFsize.java
    tomcat/trunk/java/org/apache/catalina/ssi/SSIMediator.java
    tomcat/trunk/java/org/apache/catalina/ssi/SSIProcessor.java
    tomcat/trunk/java/org/apache/catalina/ssi/SSIServletExternalResolver.java

Modified: tomcat/trunk/java/org/apache/catalina/ssi/ExpressionParseTree.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ssi/ExpressionParseTree.java?rev=832019&r1=832018&r2=832019&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ssi/ExpressionParseTree.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ssi/ExpressionParseTree.java Mon Nov  2 18:35:52
2009
@@ -211,12 +211,12 @@
      * A node the represents a String value
      */
     private class StringNode extends Node {
-        StringBuffer value;
+        StringBuilder value;
         String resolved = null;
 
 
         public StringNode(String value) {
-            this.value = new StringBuffer(value);
+            this.value = new StringBuilder(value);
         }
 
 

Modified: tomcat/trunk/java/org/apache/catalina/ssi/SSIFsize.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ssi/SSIFsize.java?rev=832019&r1=832018&r2=832019&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ssi/SSIFsize.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ssi/SSIFsize.java Mon Nov  2 18:35:52 2009
@@ -74,7 +74,7 @@
         if (numChars < 0) {
             throw new IllegalArgumentException("Num chars can't be negative");
         }
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         for (int i = 0; i < numChars; i++) {
             buf.append(aChar);
         }

Modified: tomcat/trunk/java/org/apache/catalina/ssi/SSIMediator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ssi/SSIMediator.java?rev=832019&r1=832018&r2=832019&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ssi/SSIMediator.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ssi/SSIMediator.java Mon Nov  2 18:35:52 2009
@@ -216,7 +216,7 @@
         val = val.replace("&quot;", "\"");
         val = val.replace("&amp;", "&");
 
-        StringBuffer sb = new StringBuffer(val);
+        StringBuilder sb = new StringBuilder(val);
         int charStart = sb.indexOf("&#");
         while (charStart > -1) {
             int charEnd = sb.indexOf(";", charStart);

Modified: tomcat/trunk/java/org/apache/catalina/ssi/SSIProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ssi/SSIProcessor.java?rev=832019&r1=832018&r2=832019&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ssi/SSIProcessor.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ssi/SSIProcessor.java Mon Nov  2 18:35:52 2009
@@ -98,7 +98,7 @@
         stringWriter = null;
         int index = 0;
         boolean inside = false;
-        StringBuffer command = new StringBuffer();
+        StringBuilder command = new StringBuilder();
         try {
             while (index < fileContents.length()) {
                 char c = fileContents.charAt(index);
@@ -176,19 +176,19 @@
 
 
     /**
-     * Parse a StringBuffer and take out the param type token. Called from
+     * Parse a StringBuilder and take out the param type token. Called from
      * <code>requestHandler</code>
      * 
      * @param cmd
-     *            a value of type 'StringBuffer'
+     *            a value of type 'StringBuilder'
      * @return a value of type 'String[]'
      */
-    protected String[] parseParamNames(StringBuffer cmd, int start) {
+    protected String[] parseParamNames(StringBuilder cmd, int start) {
         int bIdx = start;
         int i = 0;
         int quotes = 0;
         boolean inside = false;
-        StringBuffer retBuf = new StringBuffer();
+        StringBuilder retBuf = new StringBuilder();
         while (bIdx < cmd.length()) {
             if (!inside) {
                 while (bIdx < cmd.length() && isSpace(cmd.charAt(bIdx)))
@@ -226,18 +226,18 @@
 
 
     /**
-     * Parse a StringBuffer and take out the param token. Called from
+     * Parse a StringBuilder and take out the param token. Called from
      * <code>requestHandler</code>
      * 
      * @param cmd
-     *            a value of type 'StringBuffer'
+     *            a value of type 'StringBuilder'
      * @return a value of type 'String[]'
      */
-    protected String[] parseParamValues(StringBuffer cmd, int start, int count) {
+    protected String[] parseParamValues(StringBuilder cmd, int start, int count) {
         int valIndex = 0;
         boolean inside = false;
         String[] vals = new String[count];
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         char endQuote = 0;
         for (int bIdx = start; bIdx < cmd.length(); bIdx++) {
             if (!inside) {
@@ -277,14 +277,14 @@
 
 
     /**
-     * Parse a StringBuffer and take out the command token. Called from
+     * Parse a StringBuilder and take out the command token. Called from
      * <code>requestHandler</code>
      * 
      * @param cmd
-     *            a value of type 'StringBuffer'
+     *            a value of type 'StringBuilder'
      * @return a value of type 'String', or null if there is none
      */
-    private String parseCmd(StringBuffer cmd) {
+    private String parseCmd(StringBuilder cmd) {
         int firstLetter = -1;
         int lastLetter = -1;
         for (int i = 0; i < cmd.length(); i++) {

Modified: tomcat/trunk/java/org/apache/catalina/ssi/SSIServletExternalResolver.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ssi/SSIServletExternalResolver.java?rev=832019&r1=832018&r2=832019&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ssi/SSIServletExternalResolver.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ssi/SSIServletExternalResolver.java Mon Nov  2 18:35:52
2009
@@ -195,7 +195,7 @@
                     Enumeration<String> acceptHeaders = req.getHeaders(accept);
                     if (acceptHeaders != null)
                         if (acceptHeaders.hasMoreElements()) {
-                            StringBuffer rv = new StringBuffer(
+                            StringBuilder rv = new StringBuilder(
                                     acceptHeaders.nextElement());
                             while (acceptHeaders.hasMoreElements()) {
                                 rv.append(", ");
@@ -312,7 +312,7 @@
             } else if (nameParts[1].equals("PROTOCOL")) {
                 retVal = req.getProtocol();
             } else if (nameParts[1].equals("SOFTWARE")) {
-                StringBuffer rv = new StringBuffer(context.getServerInfo());
+                StringBuilder rv = new StringBuilder(context.getServerInfo());
                 rv.append(" ");
                 rv.append(System.getProperty("java.vm.name"));
                 rv.append("/");



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


Mime
View raw message