tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r832023 - in /tomcat/trunk/java/org/apache/catalina/util: DOMWriter.java Extension.java HexUtils.java ManifestResource.java RequestUtil.java Strftime.java URLEncoder.java XMLWriter.java
Date Mon, 02 Nov 2009 18:38:47 GMT
Author: markt
Date: Mon Nov  2 18:38:47 2009
New Revision: 832023

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

Modified:
    tomcat/trunk/java/org/apache/catalina/util/DOMWriter.java
    tomcat/trunk/java/org/apache/catalina/util/Extension.java
    tomcat/trunk/java/org/apache/catalina/util/HexUtils.java
    tomcat/trunk/java/org/apache/catalina/util/ManifestResource.java
    tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java
    tomcat/trunk/java/org/apache/catalina/util/Strftime.java
    tomcat/trunk/java/org/apache/catalina/util/URLEncoder.java
    tomcat/trunk/java/org/apache/catalina/util/XMLWriter.java

Modified: tomcat/trunk/java/org/apache/catalina/util/DOMWriter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/DOMWriter.java?rev=832023&r1=832022&r2=832023&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/util/DOMWriter.java (original)
+++ tomcat/trunk/java/org/apache/catalina/util/DOMWriter.java Mon Nov  2 18:38:47 2009
@@ -290,7 +290,7 @@
 
    /** Normalizes the given string. */
    protected String normalize(String s) {
-      StringBuffer str = new StringBuffer();
+      StringBuilder str = new StringBuilder();
 
       int len = (s != null) ? s.length() : 0;
       for ( int i = 0; i < len; i++ ) {

Modified: tomcat/trunk/java/org/apache/catalina/util/Extension.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/Extension.java?rev=832023&r1=832022&r2=832023&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/util/Extension.java (original)
+++ tomcat/trunk/java/org/apache/catalina/util/Extension.java Mon Nov  2 18:38:47 2009
@@ -220,7 +220,7 @@
      */
     public String toString() {
 
-        StringBuffer sb = new StringBuffer("Extension[");
+        StringBuilder sb = new StringBuilder("Extension[");
         sb.append(extensionName);
         if (implementationURL != null) {
             sb.append(", implementationURL=");

Modified: tomcat/trunk/java/org/apache/catalina/util/HexUtils.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/HexUtils.java?rev=832023&r1=832022&r2=832023&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/util/HexUtils.java (original)
+++ tomcat/trunk/java/org/apache/catalina/util/HexUtils.java Mon Nov  2 18:38:47 2009
@@ -114,7 +114,7 @@
      */
     public static String convert(byte bytes[]) {
 
-        StringBuffer sb = new StringBuffer(bytes.length * 2);
+        StringBuilder sb = new StringBuilder(bytes.length * 2);
         for (int i = 0; i < bytes.length; i++) {
             sb.append(convertDigit(bytes[i] >> 4));
             sb.append(convertDigit(bytes[i] & 0x0f));

Modified: tomcat/trunk/java/org/apache/catalina/util/ManifestResource.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/ManifestResource.java?rev=832023&r1=832022&r2=832023&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/util/ManifestResource.java (original)
+++ tomcat/trunk/java/org/apache/catalina/util/ManifestResource.java Mon Nov  2 18:38:47 2009
@@ -129,7 +129,7 @@
     
     public String toString() {
 
-        StringBuffer sb = new StringBuffer("ManifestResource[");
+        StringBuilder sb = new StringBuilder("ManifestResource[");
         sb.append(resourceName);
 
         sb.append(", isFulfilled=");

Modified: tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java?rev=832023&r1=832022&r2=832023&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java (original)
+++ tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java Mon Nov  2 18:38:47 2009
@@ -60,7 +60,7 @@
 
         char content[] = new char[message.length()];
         message.getChars(0, message.length(), content, 0);
-        StringBuffer result = new StringBuffer(content.length + 50);
+        StringBuilder result = new StringBuilder(content.length + 50);
         for (int i = 0; i < content.length; i++) {
             switch (content[i]) {
             case '<':

Modified: tomcat/trunk/java/org/apache/catalina/util/Strftime.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/Strftime.java?rev=832023&r1=832022&r2=832023&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/util/Strftime.java (original)
+++ tomcat/trunk/java/org/apache/catalina/util/Strftime.java Mon Nov  2 18:38:47 2009
@@ -169,7 +169,7 @@
         boolean mark = false;
         boolean modifiedCommand = false;
 
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
 
         for(int i = 0; i < pattern.length(); i++) {
             char c = pattern.charAt(i);
@@ -231,7 +231,7 @@
      * @param oldInside Flag value
      * @return True if new is inside buffer
      */
-    protected boolean translateCommand( StringBuffer buf, String pattern, int index, boolean
oldInside ) {
+    protected boolean translateCommand( StringBuilder buf, String pattern, int index, boolean
oldInside ) {
         char firstChar = pattern.charAt( index );
         boolean newInside = oldInside;
 

Modified: tomcat/trunk/java/org/apache/catalina/util/URLEncoder.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/URLEncoder.java?rev=832023&r1=832022&r2=832023&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/util/URLEncoder.java (original)
+++ tomcat/trunk/java/org/apache/catalina/util/URLEncoder.java Mon Nov  2 18:38:47 2009
@@ -59,7 +59,7 @@
 
     public String encode( String path ) {
         int maxBytesPerChar = 10;
-        StringBuffer rewrittenPath = new StringBuffer(path.length());
+        StringBuilder rewrittenPath = new StringBuilder(path.length());
         ByteArrayOutputStream buf = new ByteArrayOutputStream(maxBytesPerChar);
         OutputStreamWriter writer = null;
         try {

Modified: tomcat/trunk/java/org/apache/catalina/util/XMLWriter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/XMLWriter.java?rev=832023&r1=832022&r2=832023&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/util/XMLWriter.java (original)
+++ tomcat/trunk/java/org/apache/catalina/util/XMLWriter.java Mon Nov  2 18:38:47 2009
@@ -55,7 +55,7 @@
     /**
      * Buffer.
      */
-    protected StringBuffer buffer = new StringBuffer();
+    protected StringBuilder buffer = new StringBuilder();
 
 
     /**
@@ -236,7 +236,7 @@
         throws IOException {
         if (writer != null) {
             writer.write(buffer.toString());
-            buffer = new StringBuffer();
+            buffer = new StringBuilder();
         }
     }
 



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


Mime
View raw message