logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1224872 - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core: filter/ helpers/ impl/ javaee/ layout/ lookup/ net/ pattern/ selector/
Date Tue, 27 Dec 2011 06:49:26 GMT
Author: rgoers
Date: Tue Dec 27 06:49:24 2011
New Revision: 1224872

URL: http://svn.apache.org/viewvc?rev=1224872&view=rev
Log:
More PMD and checkstyle fixes

Modified:
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/TimeFilter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/helpers/UUIDUtil.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jContextFactory.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/javaee/JNDIContextFilter.java
    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/layout/PatternLayout.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/SerializedLayout.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/ContextMapLookup.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/EnvironmentLookup.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/MapLookup.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/lookup/StrSubstitutor.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/StructuredDataLookup.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/SystemPropertiesLookup.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/AbstractJMSReceiver.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/AbstractSocketManager.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueReceiver.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicReceiver.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/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/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/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/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/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/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

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/TimeFilter.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/filter/TimeFilter.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/TimeFilter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/TimeFilter.java Tue Dec 27 06:49:24 2011
@@ -16,15 +16,10 @@
  */
 package org.apache.logging.log4j.core.filter;
 
-import org.apache.logging.log4j.Level;
-import org.apache.logging.log4j.Marker;
-import org.apache.logging.log4j.core.Filter;
 import org.apache.logging.log4j.core.LogEvent;
-import org.apache.logging.log4j.core.Logger;
 import org.apache.logging.log4j.core.config.plugins.Plugin;
 import org.apache.logging.log4j.core.config.plugins.PluginAttr;
 import org.apache.logging.log4j.core.config.plugins.PluginFactory;
-import org.apache.logging.log4j.message.Message;
 
 import java.text.ParseException;
 import java.text.SimpleDateFormat;

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.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/helpers/Loader.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java Tue Dec 27 06:49:24 2011
@@ -21,11 +21,10 @@ import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.status.StatusLogger;
 
 import java.io.InputStream;
-import java.net.URL;
+import java.io.InterruptedIOException;
 import java.lang.IllegalAccessException;
 import java.lang.reflect.InvocationTargetException;
-import java.io.InterruptedIOException;
-
+import java.net.URL;
 
 /**
  * Load resources (or images) from various sources.
@@ -64,10 +63,12 @@ public class Loader {
      * built-in class loader in JDK 1.1.
      * <p/>
      * </ol>
+     * @param resource The resource to load.
+     * @return A URL to the resource.
      */
-    static public URL getResource(String resource) {
-        ClassLoader classLoader = null;
-        URL url = null;
+    public static URL getResource(String resource) {
+        ClassLoader classLoader;
+        URL url;
 
         try {
             classLoader = getTCL();
@@ -112,7 +113,7 @@ public class Loader {
         return ClassLoader.getSystemResource(resource);
     }
 
-     /**
+    /**
      * This method will search for <code>resource</code> in different
      * places. The search order is as follows:
      * <p/>
@@ -130,9 +131,12 @@ public class Loader {
      * built-in class loader in JDK 1.1.
      * <p/>
      * </ol>
+     * @param resource The resource to load.
+     * @param defaultLoader The default ClassLoader.
+     * @return An InputStream to read the resouce.
      */
-    static public InputStream getResourceAsStream(String resource, ClassLoader defaultLoader) {
-        ClassLoader classLoader = null;
+    public static InputStream getResourceAsStream(String resource, ClassLoader defaultLoader) {
+        ClassLoader classLoader;
         InputStream is;
 
         try {
@@ -206,7 +210,7 @@ public class Loader {
         try {
             cl = getTCL();
         } catch (Exception ex) {
-
+            // Ignore the exception. The ClassLoader will be located.
         }
         if (cl == null) {
             cl = Loader.getClassLoader();

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/helpers/UUIDUtil.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/helpers/UUIDUtil.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/helpers/UUIDUtil.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/helpers/UUIDUtil.java Tue Dec 27 06:49:24 2011
@@ -16,8 +16,6 @@
  */
 package org.apache.logging.log4j.core.helpers;
 
-import org.apache.commons.lang.StringUtils;
-
 import java.lang.reflect.Method;
 import java.net.InetAddress;
 import java.net.NetworkInterface;
@@ -33,15 +31,17 @@ import java.util.concurrent.atomic.Atomi
  * Generates a unique id. The generated UUID will be unique for approximately 8,925 years so long as
  * less than 4095 ids are generated per millisecond on the same device (as identified by its MAC adddress).
  */
-public abstract class UUIDUtil
+public final class UUIDUtil
 {
+    /**
+     * System property that may be used to seed the uuid generation with an integer value.
+     */
     public static final String UUID_SEQUENCE = "org.apache.logging.log4j.uuidSequence";
+
     private static final String ASSIGNED_SEQUENCES = "org.apache.logging.log4j.assignedSequences";
 
     private static AtomicInteger count = new AtomicInteger(0);
 
-    private static final long VERSION = 0x9000L;
-
     private static final long TYPE1 = 0x1000L;
 
     private static final byte VARIANT = (byte)0x80;
@@ -143,18 +143,6 @@ public abstract class UUIDUtil
         least = buf.getLong() | rand << 48;
     }
 
-    private static String toHexString(byte[] bytes) {
-        char[] hexArray = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
-        char[] hexChars = new char[bytes.length * 2];
-        int v;
-
-        for (int j = 0; j < bytes.length; j++) {
-            v = bytes[j] & 0xFF;
-            hexChars[j*2] = hexArray[v/16];
-            hexChars[j*2 + 1] = hexArray[v%16];
-        }
-        return new String(hexChars);
-    }
 
     /* This class cannot be instantiated */
     private UUIDUtil() {

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jContextFactory.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/impl/Log4jContextFactory.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jContextFactory.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jContextFactory.java Tue Dec 27 06:49:24 2011
@@ -17,7 +17,6 @@
 package org.apache.logging.log4j.core.impl;
 
 import org.apache.logging.log4j.core.LoggerContext;
-import org.apache.logging.log4j.core.config.DefaultConfiguration;
 import org.apache.logging.log4j.core.helpers.Constants;
 import org.apache.logging.log4j.core.helpers.Loader;
 import org.apache.logging.log4j.core.selector.ClassLoaderContextSelector;
@@ -26,7 +25,7 @@ import org.apache.logging.log4j.status.S
 import org.apache.logging.log4j.spi.LoggerContextFactory;
 
 /**
- *
+ * Factory to locate a ContextSelector and then load a LoggerContext.
  */
 public class Log4jContextFactory implements LoggerContextFactory {
 
@@ -36,6 +35,9 @@ public class Log4jContextFactory impleme
 
     private ThreadLocal<Log4jContextFactory> recursive = new ThreadLocal<Log4jContextFactory>();
 
+    /**
+     * Constructor that initializes the ContextSelector.
+     */
     public Log4jContextFactory() {
         String sel = System.getProperty(Constants.LOG4J_CONTEXT_SELECTOR);
         if (sel != null) {
@@ -53,10 +55,21 @@ public class Log4jContextFactory impleme
         selector = new ClassLoaderContextSelector();
     }
 
+    /**
+     * Return the ContextSelector.
+     * @return The ContextSelector.
+     */
     public ContextSelector getSelector() {
         return selector;
     }
 
+    /**
+     * Load the LoggerContext using the ContextSelector.
+     * @param fqcn The fully qualified class name of the caller.
+     * @param currentContext If true returns the current Context, if false returns the Context appropriate
+     * for the caller if a more appropriate Context can be determined.
+     * @return The LoggerContext.
+     */
     public LoggerContext getContext(String fqcn, boolean currentContext) {
         LoggerContext ctx = selector.getContext(fqcn, currentContext);
         synchronized (ctx) {

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.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/impl/Log4jLogEvent.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java Tue Dec 27 06:49:24 2011
@@ -188,11 +188,11 @@ public class Log4jLogEvent implements Lo
         return new LogEventProxy(this);
     }
 
-    private void readObject(ObjectInputStream stream)
-        throws InvalidObjectException {
+    private void readObject(ObjectInputStream stream) throws InvalidObjectException {
         throw new InvalidObjectException("Proxy required");
     }
 
+    @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
         String n = name.length() == 0 ? "root" : name;
@@ -236,7 +236,7 @@ public class Log4jLogEvent implements Lo
 
         /**
          * Return a Log4jLogEvent using the data in the proxy.
-         * @returna Log4jLogEvent.
+         * @return Log4jLogEvent.
          */
         protected Object readResolve() {
             return new Log4jLogEvent(name, marker, fqcnOfLogger, level, message, throwable, mdc, ndc, threadName,

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/javaee/JNDIContextFilter.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/javaee/JNDIContextFilter.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/javaee/JNDIContextFilter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/javaee/JNDIContextFilter.java Tue Dec 27 06:49:24 2011
@@ -34,13 +34,12 @@ import javax.servlet.UnavailableExceptio
 import java.io.IOException;
 
 /**
- *
+ * ServletFilter than may be used to set up a LoggerContext for each web application.
  */
 public class JNDIContextFilter implements Filter {
 
     public static final String CONTEXT_NAME = "context-name";
     public static final String CONFIG_LOCATION = "config-location";
-    private static final String CONTEXT_CLASS = "org.apache.logging.log4j.core.LoggerContext";
     private ServletContext context;
     private boolean created = false;
     private String name;

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -18,7 +18,6 @@ package org.apache.logging.log4j.core.la
 
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.core.LogEvent;
-import org.apache.logging.log4j.core.LoggerContext;
 import org.apache.logging.log4j.core.config.plugins.Plugin;
 import org.apache.logging.log4j.core.config.plugins.PluginAttr;
 import org.apache.logging.log4j.core.config.plugins.PluginFactory;
@@ -40,8 +39,8 @@ import java.util.ArrayList;
  * Appenders using this layout should have their encoding set to UTF-8 or UTF-16, otherwise events containing
  * non ASCII characters could result in corrupted log files.
  */
-@Plugin(name="HTMLLayout",type="Core",elementType="layout",printObject=true)
-public class HTMLLayout extends AbstractStringLayout {
+@Plugin(name = "HTMLLayout", type = "Core", elementType = "layout", printObject = true)
+public final class HTMLLayout extends AbstractStringLayout {
 
     protected static final int BUF_SIZE = 256;
 

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.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/PatternLayout.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java Tue Dec 27 06:49:24 2011
@@ -46,7 +46,7 @@ import java.util.List;
  *
  * See the Log4j Manual for details on the supported pattern converters.
  */
-@Plugin(name="PatternLayout",type="Core",elementType="layout",printObject=true)
+@Plugin(name = "PatternLayout", type = "Core", elementType = "layout", printObject = true)
 public class PatternLayout extends AbstractStringLayout {
     /**
      * Default pattern string for log output. Currently set to the

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.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/RFC5424Layout.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java Tue Dec 27 06:49:24 2011
@@ -16,10 +16,8 @@
  */
 package org.apache.logging.log4j.core.layout;
 
-import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.LoggingException;
 import org.apache.logging.log4j.core.LogEvent;
-import org.apache.logging.log4j.core.LoggerContext;
 import org.apache.logging.log4j.core.config.Configuration;
 import org.apache.logging.log4j.core.config.plugins.Plugin;
 import org.apache.logging.log4j.core.config.plugins.PluginAttr;
@@ -34,7 +32,6 @@ import org.apache.logging.log4j.message.
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.nio.charset.Charset;
-import java.text.DecimalFormat;
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.GregorianCalendar;
@@ -71,9 +68,6 @@ public final class RFC5424Layout extends
     private long lastTimestamp = -1;
     private String timestamppStr = null;
 
-    private static final DecimalFormat TWO_DIGIT = new DecimalFormat("00");
-    private static final DecimalFormat FOUR_DIGIT = new DecimalFormat("0000");
-
     // Not a very good default - it is the Apache Software Foundation's.
     public static final int DEFAULT_ENTERPRISE_NUMBER = 18060;
     public static final String DEFAULT_ID = "Audit";
@@ -175,7 +169,7 @@ public final class RFC5424Layout extends
         buf.append(" ");
         if (isStructured || includeMDC) {
             StructuredDataId id = null;
-            String text = "";
+            String text;
             if (isStructured) {
                 StructuredDataMessage data = (StructuredDataMessage) msg;
                 Map map = data.getData();

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/SerializedLayout.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/SerializedLayout.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/SerializedLayout.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/SerializedLayout.java Tue Dec 27 06:49:24 2011
@@ -18,30 +18,17 @@ package org.apache.logging.log4j.core.la
 
 import org.apache.logging.log4j.core.LogEvent;
 import org.apache.logging.log4j.core.config.plugins.Plugin;
-import org.apache.logging.log4j.core.config.plugins.PluginAttr;
 import org.apache.logging.log4j.core.config.plugins.PluginFactory;
-import org.apache.logging.log4j.core.helpers.Transform;
 
 import java.io.ByteArrayOutputStream;
-import java.io.FileOutputStream;
 import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.io.LineNumberReader;
 import java.io.ObjectOutputStream;
 import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
 
 /**
- *
+ * Format a LogEvent in its serialized form.
  */
-@Plugin(name="SerializedLayout",type="Core",elementType="layout",printObject=true)
+@Plugin(name = "SerializedLayout", type = "Core", elementType = "layout", printObject = true)
 public class SerializedLayout extends LayoutBase<LogEvent> {
 
     private static byte[] header;

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.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/SyslogLayout.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java Tue Dec 27 06:49:24 2011
@@ -34,7 +34,7 @@ import java.util.Locale;
 /**
  * Formats a log event as a BSD Log record.
  */
-@Plugin(name="SyslogLayout",type="Core",elementType="layout",printObject=true)
+@Plugin(name = "SyslogLayout", type = "Core", elementType = "layout", printObject = true)
 public class SyslogLayout extends AbstractStringLayout {
 
     private final Facility facility;

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.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/XMLLayout.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java Tue Dec 27 06:49:24 2011
@@ -68,7 +68,7 @@ import org.apache.logging.log4j.core.Log
  * non ASCII characters could result in corrupted
  * log files.
  */
-@Plugin(name="XMLLayout",type="Core",elementType="layout",printObject=true)
+@Plugin(name = "XMLLayout", type = "Core", elementType = "layout", printObject = true)
 public class XMLLayout extends AbstractStringLayout {
 
     private final boolean locationInfo;
@@ -214,10 +214,10 @@ public class XMLLayout extends AbstractS
 
     /**
      * Create an XML Layout.
-     * @param locationInfo
-     * @param properties
-     * @param complete
-     * @param charset
+     * @param locationInfo If "true" include the location information in the generated XML.
+     * @param properties If "true" include the thread context in the generated XML.
+     * @param complete If "true" include the XML header.
+     * @param charset The character set to use.
      * @return An XML Layout.
      */
     @PluginFactory

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/ContextMapLookup.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/ContextMapLookup.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/ContextMapLookup.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/ContextMapLookup.java Tue Dec 27 06:49:24 2011
@@ -23,14 +23,25 @@ import org.apache.logging.log4j.core.con
 /**
  * Looks up keys from system properties
  */
-@Plugin(name="ctx",type="Lookup")
+@Plugin(name = "ctx", type = "Lookup")
 public class ContextMapLookup implements StrLookup {
 
+    /**
+     * Lookup the value from the ThreadContext Map.
+     * @param key  the key to be looked up, may be null
+     * @return The value associated with the key.
+     */
     public String lookup(String key) {
         return ThreadContext.get(key);
     }
 
+    /**
+     * Lookup the value from the ThreadContext Map.
+     * @param event The current LogEvent.
+     * @param key  the key to be looked up, may be null
+     * @return The value associated with the key.
+     */
     public String lookup(LogEvent event, String key) {
-        return ThreadContext.get(key);
+        return event.getContextMap().get(key);
     }
 }

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/EnvironmentLookup.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/EnvironmentLookup.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/EnvironmentLookup.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/EnvironmentLookup.java Tue Dec 27 06:49:24 2011
@@ -22,7 +22,7 @@ import org.apache.logging.log4j.core.con
 /**
  * Looks up keys from environment variables.
  */
-@Plugin(name="env",type="Lookup")
+@Plugin(name = "env", type = "Lookup")
 public class EnvironmentLookup implements StrLookup {
 
     /**

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.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/Interpolator.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java Tue Dec 27 06:49:24 2011
@@ -26,7 +26,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 /**
- *
+ * The Interpolator is a StrLookup that acts as a proxy for all the other StrLookups.
  */
 public class Interpolator implements StrLookup {
 

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/MapLookup.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/MapLookup.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/MapLookup.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/MapLookup.java Tue Dec 27 06:49:24 2011
@@ -25,7 +25,7 @@ import java.util.Map;
 /**
  * The basis for a lookup based on a Map.
  */
-@Plugin(name="map",type="Lookup")
+@Plugin(name = "map", type = "Lookup")
 public class MapLookup<V> implements StrLookup<V> {
     /**
      * Map keys are variable names and value.

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -24,10 +24,6 @@ import java.util.Arrays;
  * <p>
  * This class comes complete with various factory methods.
  * If these do not suffice, you can subclass and implement your own matcher.
- *
- * @author Apache Software Foundation
- * @since 2.2
- * @version $Id$
  */
 public abstract class StrMatcher {
 

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/StrSubstitutor.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/StrSubstitutor.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/StrSubstitutor.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/StrSubstitutor.java Tue Dec 27 06:49:24 2011
@@ -100,9 +100,6 @@ import java.util.Properties;
  * {@link #setEnableSubstitutionInVariables(boolean) enableSubstitutionInVariables}
  * property to <b>true</b>.
  *
- * @author Apache Software Foundation
- * @version $Id$
- * @since 2.2
  */
 public class StrSubstitutor {
 

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/StructuredDataLookup.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/StructuredDataLookup.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/StructuredDataLookup.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/StructuredDataLookup.java Tue Dec 27 06:49:24 2011
@@ -16,7 +16,6 @@
  */
 package org.apache.logging.log4j.core.lookup;
 
-import org.apache.logging.log4j.ThreadContext;
 import org.apache.logging.log4j.core.LogEvent;
 import org.apache.logging.log4j.core.config.plugins.Plugin;
 import org.apache.logging.log4j.message.StructuredDataMessage;
@@ -24,7 +23,7 @@ import org.apache.logging.log4j.message.
 /**
  * Looks up keys from system properties
  */
-@Plugin(name="sd",type="Lookup")
+@Plugin(name = "sd", type = "Lookup")
 public class StructuredDataLookup implements StrLookup {
 
     public String lookup(String key) {

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/SystemPropertiesLookup.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/SystemPropertiesLookup.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/SystemPropertiesLookup.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/SystemPropertiesLookup.java Tue Dec 27 06:49:24 2011
@@ -22,7 +22,7 @@ import org.apache.logging.log4j.core.con
 /**
  * Looks up keys from system properties
  */
-@Plugin(name="sys",type="Lookup")
+@Plugin(name = "sys", type = "Lookup")
 public class SystemPropertiesLookup implements StrLookup {
 
     public String lookup(String key) {

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/AbstractJMSReceiver.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/AbstractJMSReceiver.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/AbstractJMSReceiver.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/AbstractJMSReceiver.java Tue Dec 27 06:49:24 2011
@@ -28,7 +28,7 @@ import javax.naming.NameNotFoundExceptio
 import javax.naming.NamingException;
 
 /**
- *
+ * Base class for receiving LogEvents over JMS. This class expects all messages to be serialized log events.
  */
 public abstract class AbstractJMSReceiver extends AbstractServer implements javax.jms.MessageListener {
 

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/AbstractSocketManager.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/AbstractSocketManager.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/AbstractSocketManager.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/AbstractSocketManager.java Tue Dec 27 06:49:24 2011
@@ -16,19 +16,13 @@
  */
 package org.apache.logging.log4j.core.net;
 
-import org.apache.logging.log4j.core.appender.AppenderRuntimeException;
-import org.apache.logging.log4j.core.appender.ManagerFactory;
 import org.apache.logging.log4j.core.appender.OutputStreamManager;
 
-import java.io.IOException;
 import java.io.OutputStream;
-import java.net.ConnectException;
 import java.net.InetAddress;
-import java.net.Socket;
-import java.net.UnknownHostException;
 
 /**
- *
+ * Base class for managing sockets.
  */
 public abstract class AbstractSocketManager extends OutputStreamManager {
 
@@ -36,7 +30,6 @@ public abstract class AbstractSocketMana
     protected final String host;
     protected final int port;
 
-
     public AbstractSocketManager(String name, OutputStream os, InetAddress addr, String host, int port) {
         super(os, name);
         this.address = addr;

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueReceiver.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/JMSQueueReceiver.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueReceiver.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueReceiver.java Tue Dec 27 06:49:24 2011
@@ -30,11 +30,12 @@ import java.io.BufferedReader;
 import java.io.InputStreamReader;
 
 /**
- *
+ * Receives Log Events over a JMS Queue. This implementation expects that all messages will
+ * contain a serialized LogEvent.
  */
 public class JMSQueueReceiver extends AbstractJMSReceiver {
 
-    static public void main(String[] args) throws Exception {
+    public static void main(String[] args) throws Exception {
         if (args.length != 4) {
             usage("Wrong number of arguments.");
         }
@@ -80,7 +81,7 @@ public class JMSQueueReceiver extends Ab
         }
     }
 
-    static void usage(String msg) {
+    private static void usage(String msg) {
         System.err.println(msg);
         System.err.println("Usage: java " + JMSQueueReceiver.class.getName()
             + " QueueConnectionFactoryBindingName QueueBindingName username password");

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicReceiver.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/JMSTopicReceiver.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicReceiver.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicReceiver.java Tue Dec 27 06:49:24 2011
@@ -16,13 +16,7 @@
  */
 package org.apache.logging.log4j.core.net;
 
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.core.AbstractServer;
-import org.apache.logging.log4j.core.LogEvent;
-
 import javax.jms.JMSException;
-import javax.jms.ObjectMessage;
 import javax.jms.Session;
 import javax.jms.Topic;
 import javax.jms.TopicConnection;
@@ -31,17 +25,17 @@ import javax.jms.TopicSession;
 import javax.jms.TopicSubscriber;
 import javax.naming.Context;
 import javax.naming.InitialContext;
-import javax.naming.NameNotFoundException;
 import javax.naming.NamingException;
 import java.io.BufferedReader;
 import java.io.InputStreamReader;
 
 /**
- *
+ * Receives Topic messages that contain LogEvents. This implementation expects that all messages
+ * are serialized log events.
  */
 public class JMSTopicReceiver extends AbstractJMSReceiver {
 
-    static public void main(String[] args) throws Exception {
+    public static void main(String[] args) throws Exception {
         if (args.length != 4) {
             usage("Wrong number of arguments.");
         }
@@ -86,7 +80,7 @@ public class JMSTopicReceiver extends Ab
         }
     }
 
-    static void usage(String msg) {
+    private static void usage(String msg) {
         System.err.println(msg);
         System.err.println("Usage: java " + JMSTopicReceiver.class.getName()
             + " TopicConnectionFactoryBindingName TopicBindingName username password");

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -24,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")
+@Plugin(name = "ClassNamePatternConverter", type = "Converter")
 @ConverterKeys({"C", "class"})
 public final class ClassNamePatternConverter extends NamePatternConverter {
 

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -28,7 +28,7 @@ import java.util.TimeZone;
 /**
  * Convert and format the event's date in a StringBuffer.
  */
-@Plugin(name="DatePatternConverter", type="Converter")
+@Plugin(name = "DatePatternConverter", type = "Converter")
 @ConverterKeys({"d", "date"})
 public final class DatePatternConverter extends LogEventPatternConverter implements ArrayPatternConverter {
     /**

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -21,10 +21,6 @@ import org.apache.logging.log4j.core.Log
 import org.apache.logging.log4j.core.config.plugins.Plugin;
 import org.apache.logging.log4j.core.impl.ThrowableProxy;
 
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
-
 /**
  * Outputs the Throwable portion of the LoggingEvent as a full stacktrace
  * unless this converter's option is 'short', where it just outputs the first line of the trace, or if

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -24,7 +24,7 @@ import org.apache.logging.log4j.core.con
  * date pattern for a %d specifier in a file name is different than
  * the %d pattern in pattern layout.
  */
-@Plugin(name="FileDatePatternConverter", type="FileConverter")
+@Plugin(name = "FileDatePatternConverter", type = "FileConverter")
 @ConverterKeys({"d", "date"})
 public final class FileDatePatternConverter {
     /**

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -24,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")
+@Plugin(name = "FileLocationPatternConverter", type = "Converter")
 @ConverterKeys({"F", "file"})
 public final class FileLocationPatternConverter extends LogEventPatternConverter {
     /**
@@ -46,8 +46,7 @@ public final class FileLocationPatternCo
      * @param options options, may be null.
      * @return instance of pattern converter.
      */
-    public static FileLocationPatternConverter newInstance(
-        final String[] options) {
+    public static FileLocationPatternConverter newInstance(final String[] options) {
         return INSTANCE;
     }
 

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -24,7 +24,7 @@ import org.apache.logging.log4j.core.con
 /**
  * Format the event's line location information.
  */
-@Plugin(name="FullLocationPatternConverter", type="Converter")
+@Plugin(name = "FullLocationPatternConverter", type = "Converter")
 @ConverterKeys({"l", "location"})
 public final class FullLocationPatternConverter extends LogEventPatternConverter {
     /**
@@ -46,8 +46,7 @@ public final class FullLocationPatternCo
      * @param options options, may be null.
      * @return instance of pattern converter.
      */
-    public static FullLocationPatternConverter newInstance(
-        final String[] options) {
+    public static FullLocationPatternConverter newInstance(final String[] options) {
         return INSTANCE;
     }
 

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -25,7 +25,7 @@ import java.util.Date;
 /**
  * Formats an integer.
  */
-@Plugin(name="IntegerPatternConverter", type="FileConverter")
+@Plugin(name = "IntegerPatternConverter", type = "FileConverter")
 @ConverterKeys({"i", "index"})
 public final class IntegerPatternConverter extends AbstractPatternConverter implements ArrayPatternConverter {
     /**

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -20,11 +20,10 @@ package org.apache.logging.log4j.core.pa
 import org.apache.logging.log4j.core.LogEvent;
 import org.apache.logging.log4j.core.config.plugins.Plugin;
 
-
 /**
  * Return the event's line location information in a StringBuffer.
  */
-@Plugin(name="LineLocationPatternConverter", type="Converter")
+@Plugin(name = "LineLocationPatternConverter", type = "Converter")
 @ConverterKeys({"L", "line"})
 public final class LineLocationPatternConverter extends LogEventPatternConverter {
     /**

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -17,15 +17,13 @@
 
 package org.apache.logging.log4j.core.pattern;
 
-import org.apache.logging.log4j.core.Layout;
 import org.apache.logging.log4j.core.LogEvent;
 import org.apache.logging.log4j.core.config.plugins.Plugin;
 
-
 /**
  * Formats a line separator.
  */
-@Plugin(name="LineSeparatorPatternConverter", type="Converter")
+@Plugin(name = "LineSeparatorPatternConverter", type = "Converter")
 @ConverterKeys({"n"})
 public final class LineSeparatorPatternConverter extends LogEventPatternConverter {
 
@@ -54,8 +52,7 @@ public final class LineSeparatorPatternC
    * @param options options, may be null.
    * @return instance of pattern converter.
    */
-  public static LineSeparatorPatternConverter newInstance(
-    final String[] options) {
+  public static LineSeparatorPatternConverter newInstance(final String[] options) {
     return INSTANCE;
   }
 

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -24,7 +24,7 @@ import org.apache.logging.log4j.core.con
 /**
  * Formats a logger name.
  */
-@Plugin(name="LoggerPatternConverter", type="Converter")
+@Plugin(name = "LoggerPatternConverter", type = "Converter")
 @ConverterKeys({"c", "logger"})
 public final class LoggerPatternConverter extends NamePatternConverter {
     /**

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -31,7 +31,7 @@ import java.util.TreeSet;
  * within the property bundle
  * when this pattern converter has the option set.
  */
- @Plugin(name="MDCPatternConverter", type="Converter")
+ @Plugin(name = "MDCPatternConverter", type = "Converter")
 @ConverterKeys({"X", "mdc", "MDC"})
 public final class MDCPatternConverter extends LogEventPatternConverter {
     /**

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -31,7 +31,7 @@ import java.util.TreeSet;
  * java.util.Hashtable.toString(), or to output the value of a specific key
  * within the Map.
  */
-@Plugin(name="MapPatternConverter", type="Converter")
+@Plugin(name = "MapPatternConverter", type = "Converter")
 @ConverterKeys({"K", "map", "MAP"})
 public final class MapPatternConverter extends LogEventPatternConverter {
     /**

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -20,26 +20,20 @@ package org.apache.logging.log4j.core.pa
 import org.apache.logging.log4j.Marker;
 import org.apache.logging.log4j.core.LogEvent;
 import org.apache.logging.log4j.core.config.plugins.Plugin;
-import org.apache.logging.log4j.message.FormattedMessage;
-import org.apache.logging.log4j.message.Message;
-
 
 /**
  * Return the event's rendered message in a StringBuffer.
  */
-@Plugin(name="MarkerPatternConverter", type="Converter")
+@Plugin(name = "MarkerPatternConverter", type = "Converter")
 @ConverterKeys({"marker"})
 public final class MarkerPatternConverter extends LogEventPatternConverter {
 
-    private final String format;
-
     /**
      * Private constructor.
      * @param options options, may be null.
      */
     private MarkerPatternConverter(final String[] options) {
         super("Marker", "marker");
-        format = (options != null && options.length > 0) ? options[0] : null;
     }
 
     /**

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -22,11 +22,10 @@ import org.apache.logging.log4j.core.con
 import org.apache.logging.log4j.message.FormattedMessage;
 import org.apache.logging.log4j.message.Message;
 
-
 /**
  * Return the event's rendered message in a StringBuffer.
  */
-@Plugin(name="MessagePatternConverter", type="Converter")
+@Plugin(name = "MessagePatternConverter", type = "Converter")
 @ConverterKeys({"m", "msg", "message"})
 public final class MessagePatternConverter extends LogEventPatternConverter {
 

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -46,8 +46,7 @@ public final class MethodLocationPattern
      * @param options options, may be null.
      * @return instance of MethodLocationPatternConverter.
      */
-    public static MethodLocationPatternConverter newInstance(
-        final String[] options) {
+    public static MethodLocationPatternConverter newInstance(final String[] options) {
         return INSTANCE;
     }
 

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=1224872&r1=1224871&r2=1224872&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 Tue Dec 27 06:49:24 2011
@@ -24,7 +24,7 @@ import org.apache.logging.log4j.core.con
 /**
  * Return the event's NDC in a StringBuffer.
  */
-@Plugin(name="NDCPatternConverter", type="Converter")
+@Plugin(name = "NDCPatternConverter", type = "Converter")
 @ConverterKeys({"x", "NDC"})
 public final class NDCPatternConverter extends LogEventPatternConverter {
   /**

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/RegexReplacement.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/RegexReplacement.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/RegexReplacement.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/RegexReplacement.java Tue Dec 27 06:49:24 2011
@@ -18,22 +18,17 @@
 package org.apache.logging.log4j.core.pattern;
 
 import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.core.LogEvent;
-import org.apache.logging.log4j.core.config.Configuration;
 import org.apache.logging.log4j.core.config.plugins.Plugin;
 import org.apache.logging.log4j.core.config.plugins.PluginAttr;
-import org.apache.logging.log4j.core.config.plugins.PluginConfiguration;
 import org.apache.logging.log4j.core.config.plugins.PluginFactory;
-import org.apache.logging.log4j.core.layout.PatternLayout;
 import org.apache.logging.log4j.status.StatusLogger;
 
-import java.util.List;
 import java.util.regex.Pattern;
 
 /**
- *
+ * Replace tokens in the LogEvent message.
  */
-@Plugin(name="replace", type="Core", printObject=true)
+@Plugin(name = "replace", type = "Core", printObject = true)
 public final class RegexReplacement {
 
     private final Pattern pattern;
@@ -63,6 +58,12 @@ public final class RegexReplacement {
         return "replace(regex=" + pattern.pattern() + ", replacement=" + substitution + ")";
     }
 
+    /**
+     * Create a RegexReplacement.
+     * @param regex The regular expression to locate.
+     * @param replacement The replacement value.
+     * @return A RegexReplacement.
+     */
     @PluginFactory
     public static RegexReplacement createRegexReplacement(@PluginAttr("regex") String regex,
                                                           @PluginAttr("replacement") String replacement) {

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/RegexReplacementConverter.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/RegexReplacementConverter.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/RegexReplacementConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/RegexReplacementConverter.java Tue Dec 27 06:49:24 2011
@@ -21,8 +21,6 @@ import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.core.LogEvent;
 import org.apache.logging.log4j.core.config.Configuration;
 import org.apache.logging.log4j.core.config.plugins.Plugin;
-import org.apache.logging.log4j.core.config.plugins.PluginAttr;
-import org.apache.logging.log4j.core.config.plugins.PluginFactory;
 import org.apache.logging.log4j.core.layout.PatternLayout;
 import org.apache.logging.log4j.status.StatusLogger;
 
@@ -32,7 +30,7 @@ import java.util.regex.Pattern;
 /**
  * Replacement pattern converter.
  */
-@Plugin(name="replace", type="Converter")
+@Plugin(name = "replace", type = "Converter")
 @ConverterKeys({"replace"})
 public final class RegexReplacementConverter extends LogEventPatternConverter {
 
@@ -40,7 +38,7 @@ public final class RegexReplacementConve
 
     private final String substitution;
 
-    private static Logger logger = StatusLogger.getLogger();
+    private static final Logger LOGGER = StatusLogger.getLogger();
 
     private List<PatternConverter> converters;
 
@@ -68,19 +66,19 @@ public final class RegexReplacementConve
      */
     public static RegexReplacementConverter newInstance(Configuration config, final String[] options) {
         if (options.length != 3) {
-            logger.error("Incorrect number of options on replace. Expected 3 received " + options.length);
+            LOGGER.error("Incorrect number of options on replace. Expected 3 received " + options.length);
             return null;
         }
         if (options[0] == null) {
-            logger.error("No pattern supplied on replace");
+            LOGGER.error("No pattern supplied on replace");
             return null;
         }
         if (options[1] == null) {
-            logger.error("No regular expression supplied on replace");
+            LOGGER.error("No regular expression supplied on replace");
             return null;
         }
         if (options[2] == null) {
-            logger.error("No substitution supplied on replace");
+            LOGGER.error("No substitution supplied on replace");
             return null;
         }
         Pattern p = Pattern.compile(options[1]);

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/RelativeTimePatternConverter.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/RelativeTimePatternConverter.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/RelativeTimePatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/RelativeTimePatternConverter.java Tue Dec 27 06:49:24 2011
@@ -22,11 +22,10 @@ import org.apache.logging.log4j.core.con
 
 import java.lang.management.ManagementFactory;
 
-
 /**
  * Return the relative time in milliseconds since JVM Startup.
  */
-@Plugin(name="RelativeTimePatternConverter", type="Converter")
+@Plugin(name = "RelativeTimePatternConverter", type = "Converter")
 @ConverterKeys({"r", "relative"})
 public class RelativeTimePatternConverter extends LogEventPatternConverter {
     /**

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverter.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/SequenceNumberPatternConverter.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverter.java Tue Dec 27 06:49:24 2011
@@ -26,7 +26,7 @@ import java.util.concurrent.atomic.Atomi
 /**
  * Formats the event sequence number.
  */
-@Plugin(name="SequenceNumberPatternConverter", type="Converter")
+@Plugin(name = "SequenceNumberPatternConverter", type = "Converter")
 @ConverterKeys({"sn", "sequenceNumber"})
 public class SequenceNumberPatternConverter extends LogEventPatternConverter {
     private static AtomicLong sequence = new AtomicLong();

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ThreadPatternConverter.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/ThreadPatternConverter.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ThreadPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ThreadPatternConverter.java Tue Dec 27 06:49:24 2011
@@ -23,7 +23,7 @@ import org.apache.logging.log4j.core.con
 /**
  * Formats the event thread name.
  */
-@Plugin(name="ThreadPatternConverter", type="Converter")
+@Plugin(name = "ThreadPatternConverter", type = "Converter")
 @ConverterKeys({"t", "thread"})
 public class ThreadPatternConverter extends LogEventPatternConverter {
     /**

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverter.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/ThrowablePatternConverter.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverter.java Tue Dec 27 06:49:24 2011
@@ -57,8 +57,7 @@ public class ThrowablePatternConverter e
             option = options[0];
             if (option.equalsIgnoreCase(SHORT)) {
                 count = 2;
-            } else if (option.equalsIgnoreCase(FULL)) {
-            } else {
+            } else if (!option.equalsIgnoreCase(FULL)) {
                 count = Integer.parseInt(option);
             }
 

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/UUIDPatternConverter.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/UUIDPatternConverter.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/UUIDPatternConverter.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/UUIDPatternConverter.java Tue Dec 27 06:49:24 2011
@@ -29,7 +29,7 @@ import java.util.UUID;
 /**
  * Formats the event sequence number.
  */
-@Plugin(name="UUIDPatternConverter", type="Converter")
+@Plugin(name = "UUIDPatternConverter", type = "Converter")
 @ConverterKeys({"u", "uuid"})
 public class UUIDPatternConverter extends LogEventPatternConverter {
 

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/selector/BasicContextSelector.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/selector/BasicContextSelector.java?rev=1224872&r1=1224871&r2=1224872&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/selector/BasicContextSelector.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/selector/BasicContextSelector.java Tue Dec 27 06:49:24 2011
@@ -18,7 +18,6 @@ package org.apache.logging.log4j.core.se
 
 import org.apache.logging.log4j.core.LoggerContext;
 import org.apache.logging.log4j.core.javaee.ContextAnchor;
-import org.apache.logging.log4j.status.StatusLogger;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -31,8 +30,6 @@ public class BasicContextSelector implem
 
     private static LoggerContext context = new LoggerContext("Default");
 
-    private static StatusLogger logger = StatusLogger.getLogger();
-
     public LoggerContext getContext(String FQCN, boolean currentContext) {
 
         LoggerContext ctx = ContextAnchor.threadContext.get();



Mime
View raw message