tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1138847 - in /tomcat/trunk/java/org/apache: catalina/valves/AccessLogValve.java juli/OneLineFormatter.java
Date Thu, 23 Jun 2011 12:08:31 GMT
Author: rjung
Date: Thu Jun 23 12:08:31 2011
New Revision: 1138847

URL: http://svn.apache.org/viewvc?rev=1138847&view=rev
Log:
Follow-up to r1137925:
Use buf.add(char) when there is a single character string.

Modified:
    tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
    tomcat/trunk/java/org/apache/juli/OneLineFormatter.java

Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1138847&r1=1138846&r2=1138847&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Thu Jun 23 12:08:31 2011
@@ -1302,9 +1302,10 @@ public class AccessLogValve extends Valv
                 long frac = timestamp % 1000;
                 if (frac < 100) {
                     if (frac < 10) {
-                        buf.append("00");
+                        buf.append('0');
+                        buf.append('0');
                     } else {
-                        buf.append("0");
+                        buf.append('0');
                     }
                 }
                 buf.append(frac);

Modified: tomcat/trunk/java/org/apache/juli/OneLineFormatter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/juli/OneLineFormatter.java?rev=1138847&r1=1138846&r2=1138847&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/juli/OneLineFormatter.java (original)
+++ tomcat/trunk/java/org/apache/juli/OneLineFormatter.java Thu Jun 23 12:08:31 2011
@@ -108,7 +108,8 @@ public class OneLineFormatter extends Fo
         buf.append('.');
         if (frac < 100) {
             if (frac < 10) {
-                buf.append("00");
+                buf.append('0');
+                buf.append('0');
             } else {
                 buf.append('0');
             }



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


Mime
View raw message