tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r832037 - in /tomcat/trunk/java/org/apache/juli: JdkLoggerFormatter.java OneLineFormatter.java
Date Mon, 02 Nov 2009 18:45:46 GMT
Author: markt
Date: Mon Nov  2 18:45:45 2009
New Revision: 832037

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

Modified:
    tomcat/trunk/java/org/apache/juli/JdkLoggerFormatter.java
    tomcat/trunk/java/org/apache/juli/OneLineFormatter.java

Modified: tomcat/trunk/java/org/apache/juli/JdkLoggerFormatter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/juli/JdkLoggerFormatter.java?rev=832037&r1=832036&r2=832037&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/juli/JdkLoggerFormatter.java (original)
+++ tomcat/trunk/java/org/apache/juli/JdkLoggerFormatter.java Mon Nov  2 18:45:45 2009
@@ -61,7 +61,7 @@
             name = name.substring(name.lastIndexOf(".") + 1);
 
         // Use a string buffer for better performance
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         
         buf.append(time);
         buf.append(" ");

Modified: tomcat/trunk/java/org/apache/juli/OneLineFormatter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/juli/OneLineFormatter.java?rev=832037&r1=832036&r2=832037&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/juli/OneLineFormatter.java (original)
+++ tomcat/trunk/java/org/apache/juli/OneLineFormatter.java Mon Nov  2 18:45:45 2009
@@ -54,7 +54,7 @@
 
     @Override
     public String format(LogRecord record) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         
         // Timestamp
         addTimestamp(sb, new Date(record.getMillis()));
@@ -89,11 +89,11 @@
         return sb.toString();
     }
 
-    public void addTimestamp(StringBuffer buf, Date date) {
+    public void addTimestamp(StringBuilder buf, Date date) {
         if (currentDate != date) {
             synchronized (this) {
                 if (currentDate != date) {
-                    StringBuffer current = new StringBuffer(32);
+                    StringBuilder current = new StringBuilder(32);
                     current.append(dayFormatter.format(date)); // Day
                     current.append('-');
                     current.append(lookup(monthFormatter.format(date))); // Month



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


Mime
View raw message