Add @Override
authorkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 21 Jun 2011 10:02:56 +0000 (10:02 +0000)
committerkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 21 Jun 2011 10:02:56 +0000 (10:02 +0000)
Use buf.add(char) when there is a single character string

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1137925 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/juli/OneLineFormatter.java

index aa58af8..72c7ca7 100644 (file)
@@ -59,6 +59,7 @@ public class OneLineFormatter extends Formatter {
      */
     private static final ThreadLocal<DateFormatCache> localDateCache =
             new ThreadLocal<DateFormatCache>() {
+        @Override
         protected DateFormatCache initialValue() {
             return new DateFormatCache(localCacheSize, timeFormat, globalDateCache);
         }
@@ -104,12 +105,12 @@ public class OneLineFormatter extends Formatter {
     protected void addTimestamp(StringBuilder buf, long timestamp) {
         buf.append(localDateCache.get().getFormat(timestamp));
         long frac = timestamp % 1000;
-        buf.append(".");
+        buf.append('.');
         if (frac < 100) {
             if (frac < 10) {
                 buf.append("00");
             } else {
-                buf.append("0");
+                buf.append('0');
             }
         }
         buf.append(frac);