logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1225762 [1/2] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src: main/java/org/apache/logging/log4j/core/layout/ main/java/org/apache/logging/log4j/core/lookup/ main/java/org/apache/logging/log4j/core/net/ main/ja...
Date Fri, 30 Dec 2011 06:13:05 GMT
Author: rgoers
Date: Fri Dec 30 06:13:04 2011
New Revision: 1225762

URL: http://svn.apache.org/viewvc?rev=1225762&view=rev
Log:
Yet more checkstyle and javadoc fixes

Modified:
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/StrMatcher.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/package-info.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/AbstractPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ArrayPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/CachedDateFormat.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ClassNamePatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ConverterKeys.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/DatePatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ExtendedThrowablePatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FileDatePatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FileLocationPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FormattingInfo.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FullLocationPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/IntegerPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LevelPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LineLocationPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LineSeparatorPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LiteralPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LogEventPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LoggerPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MDCPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MapPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MarkerPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MessagePatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MethodLocationPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/NDCPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/NameAbbreviator.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/NamePatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/RegexReplacement.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/RegexReplacementConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/RelativeTimePatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/RootThrowablePatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ThreadPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/UUIDPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/selector/BasicContextSelector.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/selector/ContextSelector.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/selector/JNDIContextSelector.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/appender/flume/UUIDTest.java

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java Fri Dec 30 06:13:04 2011
@@ -124,16 +124,15 @@ public final class HTMLLayout extends Ab
         sbuf.append("</tr>").append(LINE_SEP);
 
         if (event.getContextStack().size() > 0) {
-            sbuf.append(
-                "<tr><td bgcolor=\"#EEEEEE\" style=\"font-size : xx-small;\" colspan=\"6\" title=\"Nested Diagnostic Context\">");
+            sbuf.append("<tr><td bgcolor=\"#EEEEEE\" style=\"font-size : xx-small;\" colspan=\"6\" ");
+            sbuf.append("title=\"Nested Diagnostic Context\">");
             sbuf.append("NDC: ").append(Transform.escapeTags(event.getContextStack().toString()));
             sbuf.append("</td></tr>").append(LINE_SEP);
         }
 
-
         if (event.getContextMap().size() > 0) {
-            sbuf.append(
-                "<tr><td bgcolor=\"#EEEEEE\" style=\"font-size : xx-small;\" colspan=\"6\" title=\"Mapped Diagnostic Context\">");
+            sbuf.append("<tr><td bgcolor=\"#EEEEEE\" style=\"font-size : xx-small;\" colspan=\"6\" ");
+            sbuf.append("title=\"Mapped Diagnostic Context\">");
             sbuf.append("MDC: ").append(Transform.escapeTags(event.getContextMap().toString()));
             sbuf.append("</td></tr>").append(LINE_SEP);
         }
@@ -190,8 +189,8 @@ public final class HTMLLayout extends Ab
     @Override
     public byte[] getHeader() {
         StringBuilder sbuf = new StringBuilder();
-        sbuf.append(
-            "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">");
+        sbuf.append("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" ");
+        sbuf.append("\"http://www.w3.org/TR/html4/loose.dtd\">");
         sbuf.append(LINE_SEP);
         sbuf.append("<html>").append(LINE_SEP);
         sbuf.append("<head>").append(LINE_SEP);

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/StrMatcher.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/StrMatcher.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/StrMatcher.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/StrMatcher.java Fri Dec 30 06:13:04 2011
@@ -420,7 +420,7 @@ public abstract class StrMatcher {
          */
         @Override
         public int isMatch(char[] buffer, int pos, int bufferStart, int bufferEnd) {
-            return buffer[pos] <= 32 ? 1 : 0;
+            return buffer[pos] <= ' ' ? 1 : 0;
         }
     }
 

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/package-info.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/package-info.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/package-info.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/package-info.java Fri Dec 30 06:13:04 2011
@@ -15,6 +15,6 @@
  * limitations under the license.
  */
 /**
- * Log4j 2.0 network support
+ * Log4j 2.0 network support.
  */
 package org.apache.logging.log4j.core.net;

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/AbstractPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/AbstractPatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/AbstractPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/AbstractPatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ArrayPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ArrayPatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ArrayPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ArrayPatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,18 +1,18 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
 package org.apache.logging.log4j.core.pattern;
 
@@ -21,5 +21,10 @@ package org.apache.logging.log4j.core.pa
  */
 public interface ArrayPatternConverter extends PatternConverter {
 
+    /**
+     * Format an array of Objects.
+     * @param objects The Object array.
+     * @param toAppendTo The StringBuilder to add the content to.
+     */
     void format(Object[] objects, final StringBuilder toAppendTo);
 }

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/CachedDateFormat.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/CachedDateFormat.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/CachedDateFormat.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/CachedDateFormat.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import java.text.DateFormat;
@@ -40,6 +39,12 @@ final class CachedDateFormat extends Dat
     public static final int NO_MILLISECONDS = -2;
 
     /**
+     * Constant used to represent that there was an
+     * observed change, but was an expected change.
+     */
+    public static final int UNRECOGNIZED_MILLISECONDS = -1;
+
+    /**
      * Supported digit set.  If the wrapped DateFormat uses
      * a different unit set, the millisecond pattern
      * will not be recognized and duplicate requests
@@ -48,12 +53,6 @@ final class CachedDateFormat extends Dat
     private static final String DIGITS = "0123456789";
 
     /**
-     * Constant used to represent that there was an
-     * observed change, but was an expected change.
-     */
-    public static final int UNRECOGNIZED_MILLISECONDS = -1;
-
-    /**
      * First magic number used to detect the millisecond position.
      */
     private static final int MAGIC1 = 654;
@@ -78,6 +77,18 @@ final class CachedDateFormat extends Dat
      */
     private static final String ZERO_STRING = "000";
 
+    private static final int BUF_SIZE = 50;
+
+    private static final int MILLIS_IN_SECONDS = 1000;
+
+    private static final int DEFAULT_VALIDITY = 1000;
+
+    private static final int THREE_DIGITS = 100;
+
+    private static final int TWO_DIGITS = 10;
+
+    private static final long SLOTS = 1000L;
+
     /**
      * Wrapped formatter.
      */
@@ -97,7 +108,7 @@ final class CachedDateFormat extends Dat
     /**
      * Cache of previous conversion.
      */
-    private StringBuffer cache = new StringBuffer(50);
+    private StringBuffer cache = new StringBuffer(BUF_SIZE);
 
     /**
      * Maximum validity period for the cache.
@@ -156,10 +167,10 @@ final class CachedDateFormat extends Dat
      *         field (likely RelativeTimeDateFormat)
      */
     public static int findMillisecondStart(final long time, final String formatted, final DateFormat formatter) {
-        long slotBegin = (time / 1000) * 1000;
+        long slotBegin = (time / MILLIS_IN_SECONDS) * MILLIS_IN_SECONDS;
 
         if (slotBegin > time) {
-            slotBegin -= 1000;
+            slotBegin -= MILLIS_IN_SECONDS;
         }
 
         int millis = (int) (time - slotBegin);
@@ -252,8 +263,7 @@ final class CachedDateFormat extends Dat
             //    Check if the cache is still valid.
             //    If the requested time is within the same integral second
             //       as the last request and a shorter expiration was not requested.
-            (now < (slotBegin + expiration)) && (now >= slotBegin)
-            && (now < (slotBegin + 1000L))) {
+            (now < (slotBegin + expiration)) && (now >= slotBegin) && (now < (slotBegin + SLOTS))) {
             //
             //    if there was a millisecond field then update it
             //
@@ -278,10 +288,10 @@ final class CachedDateFormat extends Dat
         cache.append(formatter.format(tmpDate));
         buf.append(cache);
         previousTime = now;
-        slotBegin = (previousTime / 1000) * 1000;
+        slotBegin = (previousTime / MILLIS_IN_SECONDS) * MILLIS_IN_SECONDS;
 
         if (slotBegin > previousTime) {
-            slotBegin -= 1000;
+            slotBegin -= MILLIS_IN_SECONDS;
         }
 
         //
@@ -306,9 +316,9 @@ final class CachedDateFormat extends Dat
      */
     private static void millisecondFormat(
         final int millis, final StringBuffer buf, final int offset) {
-        buf.setCharAt(offset, DIGITS.charAt(millis / 100));
-        buf.setCharAt(offset + 1, DIGITS.charAt((millis / 10) % 10));
-        buf.setCharAt(offset + 2, DIGITS.charAt(millis % 10));
+        buf.setCharAt(offset, DIGITS.charAt(millis / THREE_DIGITS));
+        buf.setCharAt(offset + 1, DIGITS.charAt((millis / TWO_DIGITS) % TWO_DIGITS));
+        buf.setCharAt(offset + 2, DIGITS.charAt(millis % TWO_DIGITS));
     }
 
     /**
@@ -366,6 +376,6 @@ final class CachedDateFormat extends Dat
             return 1;
         }
 
-        return 1000;
+        return DEFAULT_VALIDITY;
     }
 }

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ClassNamePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ClassNamePatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ClassNamePatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ClassNamePatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.core.LogEvent;
@@ -25,7 +24,7 @@ import org.apache.logging.log4j.core.con
  * Formats the class name of the site of the logging request.
  */
 @Plugin(name = "ClassNamePatternConverter", type = "Converter")
-@ConverterKeys({"C", "class"})
+@ConverterKeys({"C", "class" })
 public final class ClassNamePatternConverter extends NamePatternConverter {
 
     private static final String NA = "?";

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ConverterKeys.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ConverterKeys.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ConverterKeys.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ConverterKeys.java Fri Dec 30 06:13:04 2011
@@ -27,5 +27,5 @@ import java.lang.annotation.Target;
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.TYPE)
 public @interface ConverterKeys {
-    public String[] value();
+    String[] value();
 }

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/DatePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/DatePatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/DatePatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/DatePatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.core.LogEvent;
@@ -29,7 +28,7 @@ import java.util.TimeZone;
  * Convert and format the event's date in a StringBuffer.
  */
 @Plugin(name = "DatePatternConverter", type = "Converter")
-@ConverterKeys({"d", "date"})
+@ConverterKeys({"d", "date" })
 public final class DatePatternConverter extends LogEventPatternConverter implements ArrayPatternConverter {
     /**
      * ABSOLUTE string literal.
@@ -100,7 +99,7 @@ public final class DatePatternConverter 
         try {
             simpleFormat = new SimpleDateFormat(pattern);
         } catch (IllegalArgumentException e) {
-            logger.warn("Could not instantiate SimpleDateFormat with pattern " + patternOption, e);
+            LOGGER.warn("Could not instantiate SimpleDateFormat with pattern " + patternOption, e);
 
             // default to the ISO8601 format
             simpleFormat = new SimpleDateFormat(ISO8601_PATTERN);

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ExtendedThrowablePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ExtendedThrowablePatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ExtendedThrowablePatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ExtendedThrowablePatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.core.LogEvent;
@@ -30,8 +29,8 @@ import org.apache.logging.log4j.core.imp
  * version of the jar if available.
  */
 @Plugin(name = "ExtendedThrowablePatternConverter", type = "Converter")
-@ConverterKeys({"xEx", "xThrowable", "xException"})
-public class ExtendedThrowablePatternConverter extends ThrowablePatternConverter {
+@ConverterKeys({"xEx", "xThrowable", "xException" })
+public final class ExtendedThrowablePatternConverter extends ThrowablePatternConverter {
     /**
      * Private constructor.
      *

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FileDatePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FileDatePatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FileDatePatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FileDatePatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.core.config.plugins.Plugin;
@@ -25,7 +24,7 @@ import org.apache.logging.log4j.core.con
  * the %d pattern in pattern layout.
  */
 @Plugin(name = "FileDatePatternConverter", type = "FileConverter")
-@ConverterKeys({"d", "date"})
+@ConverterKeys({"d", "date" })
 public final class FileDatePatternConverter {
     /**
      * Private constructor.

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FileLocationPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FileLocationPatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FileLocationPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FileLocationPatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.core.LogEvent;
@@ -25,7 +24,7 @@ import org.apache.logging.log4j.core.con
  * Return the event's line location information in a StringBuffer.
  */
 @Plugin(name = "FileLocationPatternConverter", type = "Converter")
-@ConverterKeys({"F", "file"})
+@ConverterKeys({"F", "file" })
 public final class FileLocationPatternConverter extends LogEventPatternConverter {
     /**
      * Singleton.

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FormattingInfo.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FormattingInfo.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FormattingInfo.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FormattingInfo.java Fri Dec 30 06:13:04 2011
@@ -1,18 +1,18 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
 
 package org.apache.logging.log4j.core.pattern;
@@ -121,7 +121,7 @@ public final class FormattingInfo {
             } else {
                 int padLength = minLength - rawLength;
 
-                for (; padLength > 8; padLength -= 8) {
+                for (; padLength > SPACES.length; padLength -= SPACES.length) {
                     buffer.insert(fieldStart, SPACES);
                 }
 

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FullLocationPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FullLocationPatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FullLocationPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/FullLocationPatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.core.LogEvent;
@@ -25,7 +24,7 @@ import org.apache.logging.log4j.core.con
  * Format the event's line location information.
  */
 @Plugin(name = "FullLocationPatternConverter", type = "Converter")
-@ConverterKeys({"l", "location"})
+@ConverterKeys({"l", "location" })
 public final class FullLocationPatternConverter extends LogEventPatternConverter {
     /**
      * Singleton.

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/IntegerPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/IntegerPatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/IntegerPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/IntegerPatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.core.config.plugins.Plugin;
@@ -26,7 +25,7 @@ import java.util.Date;
  * Formats an integer.
  */
 @Plugin(name = "IntegerPatternConverter", type = "FileConverter")
-@ConverterKeys({"i", "index"})
+@ConverterKeys({"i", "index" })
 public final class IntegerPatternConverter extends AbstractPatternConverter implements ArrayPatternConverter {
     /**
      * Singleton.

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LevelPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LevelPatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LevelPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LevelPatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.Level;
@@ -26,7 +25,7 @@ import org.apache.logging.log4j.core.con
  * Return the event's level in a StringBuffer.
  */
 @Plugin(name = "LevelPatternConverter", type = "Converter")
-@ConverterKeys({"p", "level"})
+@ConverterKeys({"p", "level" })
 public final class LevelPatternConverter extends LogEventPatternConverter {
     /**
      * Singleton.

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LineLocationPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LineLocationPatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LineLocationPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LineLocationPatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.core.LogEvent;
@@ -24,7 +23,7 @@ import org.apache.logging.log4j.core.con
  * Return the event's line location information in a StringBuffer.
  */
 @Plugin(name = "LineLocationPatternConverter", type = "Converter")
-@ConverterKeys({"L", "line"})
+@ConverterKeys({"L", "line" })
 public final class LineLocationPatternConverter extends LogEventPatternConverter {
     /**
      * Singleton.

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LineSeparatorPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LineSeparatorPatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LineSeparatorPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LineSeparatorPatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.core.LogEvent;
@@ -24,7 +23,7 @@ import org.apache.logging.log4j.core.con
  * Formats a line separator.
  */
 @Plugin(name = "LineSeparatorPatternConverter", type = "Converter")
-@ConverterKeys({"n"})
+@ConverterKeys({"n" })
 public final class LineSeparatorPatternConverter extends LogEventPatternConverter {
 
   private static final String LINE_SEP = System.getProperty("line.separator");

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LiteralPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LiteralPatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LiteralPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LiteralPatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.core.LogEvent;
@@ -45,11 +44,16 @@ public final class LiteralPatternConvert
     public void format(final LogEvent event, final StringBuilder toAppendTo) {
         toAppendTo.append(literal);
     }
-
+    /**
+     * {@inheritDoc}
+     */
     public void format(final Object obj, final StringBuilder output) {
         output.append(literal);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void format(Object[] objects, final StringBuilder output) {
         output.append(literal);
     }

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LogEventPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LogEventPatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LogEventPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LogEventPatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.Logger;
@@ -26,8 +25,10 @@ import org.apache.logging.log4j.status.S
  * that can format information from instances of LoggingEvent.
  */
 public abstract class LogEventPatternConverter extends AbstractPatternConverter {
-
-    protected static final Logger logger = StatusLogger.getLogger();
+    /**
+     * Allow subclasses access to the status logger without creating another instance.
+     */
+    protected static final Logger LOGGER = StatusLogger.getLogger();
     /**
      * Constructs an instance of LoggingEventPatternConverter.
      *

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LoggerPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LoggerPatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LoggerPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LoggerPatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.core.LogEvent;
@@ -25,7 +24,7 @@ import org.apache.logging.log4j.core.con
  * Formats a logger name.
  */
 @Plugin(name = "LoggerPatternConverter", type = "Converter")
-@ConverterKeys({"c", "logger"})
+@ConverterKeys({"c", "logger" })
 public final class LoggerPatternConverter extends NamePatternConverter {
     /**
      * Singleton.

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MDCPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MDCPatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MDCPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MDCPatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.core.LogEvent;
@@ -32,7 +31,7 @@ import java.util.TreeSet;
  * when this pattern converter has the option set.
  */
  @Plugin(name = "MDCPatternConverter", type = "Converter")
-@ConverterKeys({"X", "mdc", "MDC"})
+@ConverterKeys({"X", "mdc", "MDC" })
 public final class MDCPatternConverter extends LogEventPatternConverter {
     /**
      * Name of property to output.

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MapPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MapPatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MapPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MapPatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.core.LogEvent;
@@ -32,7 +31,7 @@ import java.util.TreeSet;
  * within the Map.
  */
 @Plugin(name = "MapPatternConverter", type = "Converter")
-@ConverterKeys({"K", "map", "MAP"})
+@ConverterKeys({"K", "map", "MAP" })
 public final class MapPatternConverter extends LogEventPatternConverter {
     /**
      * Name of property to output.

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MarkerPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MarkerPatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MarkerPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MarkerPatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.Marker;
@@ -25,7 +24,7 @@ import org.apache.logging.log4j.core.con
  * Return the event's rendered message in a StringBuffer.
  */
 @Plugin(name = "MarkerPatternConverter", type = "Converter")
-@ConverterKeys({"marker"})
+@ConverterKeys({"marker" })
 public final class MarkerPatternConverter extends LogEventPatternConverter {
 
     /**

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MessagePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MessagePatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MessagePatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MessagePatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.core.LogEvent;
@@ -26,7 +25,7 @@ import org.apache.logging.log4j.message.
  * Return the event's rendered message in a StringBuffer.
  */
 @Plugin(name = "MessagePatternConverter", type = "Converter")
-@ConverterKeys({"m", "msg", "message"})
+@ConverterKeys({"m", "msg", "message" })
 public final class MessagePatternConverter extends LogEventPatternConverter {
 
     private final String format;

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MethodLocationPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MethodLocationPatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MethodLocationPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/MethodLocationPatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.core.LogEvent;
@@ -25,7 +24,7 @@ import org.apache.logging.log4j.core.con
  * Return the event's line location information in a StringBuffer.
  */
 @Plugin(name = "MethodLocationPatternConverter", type = "Converter")
-@ConverterKeys({"M", "method"})
+@ConverterKeys({"M", "method" })
 public final class MethodLocationPatternConverter extends LogEventPatternConverter {
     /**
      * Singleton.

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/NDCPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/NDCPatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/NDCPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/NDCPatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.core.LogEvent;
@@ -25,7 +24,7 @@ import org.apache.logging.log4j.core.con
  * Return the event's NDC in a StringBuffer.
  */
 @Plugin(name = "NDCPatternConverter", type = "Converter")
-@ConverterKeys({"x", "NDC"})
+@ConverterKeys({"x", "NDC" })
 public final class NDCPatternConverter extends LogEventPatternConverter {
   /**
    *   Singleton.

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/NameAbbreviator.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/NameAbbreviator.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/NameAbbreviator.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/NameAbbreviator.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import java.util.ArrayList;

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/NamePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/NamePatternConverter.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/NamePatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/NamePatternConverter.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java?rev=1225762&r1=1225761&r2=1225762&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java Fri Dec 30 06:13:04 2011
@@ -1,20 +1,19 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
+ * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache license, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * the License. You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
  */
-
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.Logger;
@@ -43,29 +42,40 @@ public final class PatternParser {
     private static final char ESCAPE_CHAR = '%';
 
     /**
-     * Literal state.
-     */
-    private static final int LITERAL_STATE = 0;
-
-    /**
-     * In converter name state.
+     * The states the parser can be in while parsing the pattern.
      */
-    private static final int CONVERTER_STATE = 1;
+    private enum ParserState {
+        /**
+         * Literal state.
+         */
+        LITERAL_STATE,
+
+        /**
+         * In converter name state.
+         */
+        CONVERTER_STATE,
+
+        /**
+         * Dot state.
+         */
+        DOT_STATE,
+
+        /**
+         * Min state.
+         */
+        MIN_STATE,
+
+        /**
+         * Max state.
+         */
+        MAX_STATE;
+    }
 
-    /**
-     * Dot state.
-     */
-    private static final int DOT_STATE = 3;
+    private static final Logger LOGGER = StatusLogger.getLogger();
 
-    /**
-     * Min state.
-     */
-    private static final int MIN_STATE = 4;
+    private static final int BUF_SIZE = 32;
 
-    /**
-     * Max state.
-     */
-    private static final int MAX_STATE = 5;
+    private static final int DECIMAL = 10;
 
     /**
      * Does pattern process exceptions.
@@ -76,15 +86,17 @@ public final class PatternParser {
 
     private final Map<String, Class<PatternConverter>> converterRules;
 
-    protected final static Logger logger = StatusLogger.getLogger();
-
 
+    /**
+     * Constructor.
+     * @param converterKey The type of converters that will be used.
+     */
     public PatternParser(String converterKey) {
         this(null, converterKey, null);
     }
 
     /**
-     * Constructor
+     * Constructor.
      * @param config The current Configuration.
      * @param converterKey The key to lookup the converters.
      * @param expected The expected base Class of each Converter.
@@ -106,7 +118,7 @@ public final class PatternParser {
                     }
                 }
             } catch (Exception ex) {
-                logger.error("Error processing plugin " + type.getElementName(), ex);
+                LOGGER.error("Error processing plugin " + type.getElementName(), ex);
             }
         }
         converterRules = converters;
@@ -226,10 +238,10 @@ public final class PatternParser {
             throw new NullPointerException("pattern");
         }
 
-        StringBuilder currentLiteral = new StringBuilder(32);
+        StringBuilder currentLiteral = new StringBuilder(BUF_SIZE);
 
         int patternLength = pattern.length();
-        int state = LITERAL_STATE;
+        ParserState state = ParserState.LITERAL_STATE;
         char c;
         int i = 0;
         FormattingInfo formattingInfo = FormattingInfo.getDefault();
@@ -265,7 +277,7 @@ public final class PatternParser {
 
                                 currentLiteral.setLength(0);
                                 currentLiteral.append(c); // append %
-                                state = CONVERTER_STATE;
+                                state = ParserState.CONVERTER_STATE;
                                 formattingInfo = FormattingInfo.getDefault();
                         }
                     } else {
@@ -286,7 +298,7 @@ public final class PatternParser {
                             break;
 
                         case '.':
-                            state = DOT_STATE;
+                            state = ParserState.DOT_STATE;
 
                             break;
 
@@ -295,13 +307,13 @@ public final class PatternParser {
                             if ((c >= '0') && (c <= '9')) {
                                 formattingInfo = new FormattingInfo(formattingInfo.isLeftAligned(), c - '0',
                                         formattingInfo.getMaxLength());
-                                state = MIN_STATE;
+                                state = ParserState.MIN_STATE;
                             } else {
                                 i = finalizeConverter(c, pattern, i, currentLiteral, formattingInfo,
                                         converterRules, patternConverters, formattingInfos);
 
                                 // Next pattern is assumed to be a literal.
-                                state = LITERAL_STATE;
+                                state = ParserState.LITERAL_STATE;
                                 formattingInfo = FormattingInfo.getDefault();
                                 currentLiteral.setLength(0);
                             }
@@ -313,15 +325,16 @@ public final class PatternParser {
                     currentLiteral.append(c);
 
                     if ((c >= '0') && (c <= '9')) {
+                        // Multiply the existing value and add the value of the number just encountered.
                         formattingInfo = new FormattingInfo(formattingInfo.isLeftAligned(),
-                                (formattingInfo.getMinLength() * 10) + (c - '0'),
+                                (formattingInfo.getMinLength() * DECIMAL) + (c - '0'),
                                 formattingInfo.getMaxLength());
                     } else if (c == '.') {
-                        state = DOT_STATE;
+                        state = ParserState.DOT_STATE;
                     } else {
                         i = finalizeConverter(c, pattern, i, currentLiteral, formattingInfo,
                                 converterRules, patternConverters, formattingInfos);
-                        state = LITERAL_STATE;
+                        state = ParserState.LITERAL_STATE;
                         formattingInfo = FormattingInfo.getDefault();
                         currentLiteral.setLength(0);
                     }
@@ -334,12 +347,12 @@ public final class PatternParser {
                     if ((c >= '0') && (c <= '9')) {
                         formattingInfo = new FormattingInfo(formattingInfo.isLeftAligned(),
                             formattingInfo.getMinLength(), c - '0');
-                        state = MAX_STATE;
+                        state = ParserState.MAX_STATE;
                     } else {
-                        logger.error("Error occurred in position " + i
+                        LOGGER.error("Error occurred in position " + i
                                 + ".\n Was expecting digit, instead got char \"" + c + "\".");
 
-                        state = LITERAL_STATE;
+                        state = ParserState.LITERAL_STATE;
                     }
 
                     break;
@@ -348,13 +361,14 @@ public final class PatternParser {
                     currentLiteral.append(c);
 
                     if ((c >= '0') && (c <= '9')) {
+                        // Multiply the existing value and add the value of the number just encountered.
                         formattingInfo = new FormattingInfo(
                                 formattingInfo.isLeftAligned(), formattingInfo.getMinLength(),
-                                (formattingInfo.getMaxLength() * 10) + (c - '0'));
+                                (formattingInfo.getMaxLength() * DECIMAL) + (c - '0'));
                     } else {
                         i = finalizeConverter(c, pattern, i, currentLiteral, formattingInfo,
                                 converterRules, patternConverters, formattingInfos);
-                        state = LITERAL_STATE;
+                        state = ParserState.LITERAL_STATE;
                         formattingInfo = FormattingInfo.getDefault();
                         currentLiteral.setLength(0);
                     }
@@ -395,7 +409,7 @@ public final class PatternParser {
         }
 
         if (converterClass == null) {
-            logger.error("Unrecognized format specifier [" + converterId + "]");
+            LOGGER.error("Unrecognized format specifier [" + converterId + "]");
 
             return null;
         }
@@ -407,13 +421,13 @@ public final class PatternParser {
                 if (newInstance == null) {
                     newInstance = method;
                 } else {
-                    logger.error("Class " + converterClass + " cannot contain multiple newInstance methods");
+                    LOGGER.error("Class " + converterClass + " cannot contain multiple newInstance methods");
                     return null;
                 }
             }
         }
         if (newInstance == null) {
-            logger.error("Class " + converterClass + " does not contain a newInstance method");
+            LOGGER.error("Class " + converterClass + " does not contain a newInstance method");
             return null;
         }
 
@@ -430,7 +444,7 @@ public final class PatternParser {
                 } else if (clazz.isAssignableFrom(Configuration.class)) {
                     parms[i] = config;
                 } else {
-                    logger.error("Unknown parameter type " + clazz.getName() + " for newInstance method of " +
+                    LOGGER.error("Unknown parameter type " + clazz.getName() + " for newInstance method of " +
                         converterClass.getName());
                     errors = true;
                 }
@@ -450,10 +464,10 @@ public final class PatternParser {
 
                 return (PatternConverter) newObj;
             } else {
-                logger.warn("Class " + converterClass.getName() + " does not extend PatternConverter.");
+                LOGGER.warn("Class " + converterClass.getName() + " does not extend PatternConverter.");
             }
         } catch (Exception ex) {
-            logger.error("Error creating converter for " + converterId, ex);
+            LOGGER.error("Error creating converter for " + converterId, ex);
         }
 
         return null;
@@ -501,7 +515,7 @@ public final class PatternParser {
             msg.append(Integer.toString(i));
             msg.append(" in conversion pattern.");
 
-            logger.error(msg.toString());
+            LOGGER.error(msg.toString());
 
             patternConverters.add(new LiteralPatternConverter(currentLiteral.toString()));
             formattingInfos.add(FormattingInfo.getDefault());



Mime
View raw message