incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r923205 - /sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/ResponseUtil.java
Date Mon, 15 Mar 2010 13:01:13 GMT
Author: cziegeler
Date: Mon Mar 15 13:01:12 2010
New Revision: 923205

URL: http://svn.apache.org/viewvc?rev=923205&view=rev
Log:
Use StringBuilder instead of StringBuffer

Modified:
    sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/ResponseUtil.java

Modified: sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/ResponseUtil.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/ResponseUtil.java?rev=923205&r1=923204&r2=923205&view=diff
==============================================================================
--- sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/ResponseUtil.java (original)
+++ sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/ResponseUtil.java Mon
Mar 15 13:01:12 2010
@@ -23,10 +23,10 @@ import java.io.Writer;
 
 /** Response-related utilities */
 public class ResponseUtil {
-    
+
     private static class XmlEscapingWriter extends Writer {
         private final Writer target;
-        
+
         XmlEscapingWriter(Writer target) {
             this.target = target;
         }
@@ -76,14 +76,14 @@ public class ResponseUtil {
             write(str.toCharArray());
         }
     }
-    
+
     /** Escape xml text */
     public static String escapeXml(String input) {
         if(input == null) {
             return null;
         }
-        
-        final StringBuffer b = new StringBuffer(input.length());
+
+        final StringBuilder b = new StringBuilder(input.length());
         for(int i = 0;i  < input.length(); i++) {
             final char c = input.charAt(i);
             if(c == '&') {
@@ -98,7 +98,7 @@ public class ResponseUtil {
         }
         return b.toString();
     }
-    
+
     /** Return a Writer that writes escaped XML text to target
      */
     public static Writer getXmlEscapingWriter(Writer target) {



Mime
View raw message