logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1435937 [2/3] - in /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core: ./ appender/ appender/rewrite/ appender/rolling/ config/ config/plugins/ filter/ helpers/ impl/ layout/ lookup/ net/ pattern/ selector/
Date Sun, 20 Jan 2013 19:59:57 GMT
Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/CompositeFilter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/CompositeFilter.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/CompositeFilter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/CompositeFilter.java Sun Jan 20 19:59:55 2013
@@ -111,7 +111,7 @@ public final class CompositeFilter imple
 
     /**
      * Returns the result that should be returned when the filter does not match the event.
-     * 
+     *
      * @return the Result that should be returned when the filter does not match the event.
      */
     public Result getOnMismatch() {
@@ -120,7 +120,7 @@ public final class CompositeFilter imple
 
     /**
      * Returns the result that should be returned when the filter matches the event.
-     * 
+     *
      * @return the Result that should be returned when the filter matches the event.
      */
     public Result getOnMatch() {
@@ -129,7 +129,7 @@ public final class CompositeFilter imple
 
     /**
      * Filter an event.
-     * 
+     *
      * @param logger
      *            The Logger.
      * @param level
@@ -142,7 +142,8 @@ public final class CompositeFilter imple
      *            An array of parameters or null.
      * @return the Result.
      */
-    public Result filter(final Logger logger, final Level level, final Marker marker, final String msg, final Object... params) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final String msg,
+                         final Object... params) {
         Result result = Result.NEUTRAL;
         for (final Filter filter : filters) {
             result = filter.filter(logger, level, marker, msg, params);
@@ -155,7 +156,7 @@ public final class CompositeFilter imple
 
     /**
      * Filter an event.
-     * 
+     *
      * @param logger
      *            The Logger.
      * @param level
@@ -168,7 +169,8 @@ public final class CompositeFilter imple
      *            A Throwable or null.
      * @return the Result.
      */
-    public Result filter(final Logger logger, final Level level, final Marker marker, final Object msg, final Throwable t) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final Object msg,
+                         final Throwable t) {
         Result result = Result.NEUTRAL;
         for (final Filter filter : filters) {
             result = filter.filter(logger, level, marker, msg, t);
@@ -181,7 +183,7 @@ public final class CompositeFilter imple
 
     /**
      * Filter an event.
-     * 
+     *
      * @param logger
      *            The Logger.
      * @param level
@@ -194,7 +196,8 @@ public final class CompositeFilter imple
      *            A Throwable or null.
      * @return the Result.
      */
-    public Result filter(final Logger logger, final Level level, final Marker marker, final Message msg, final Throwable t) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final Message msg,
+                         final Throwable t) {
         Result result = Result.NEUTRAL;
         for (final Filter filter : filters) {
             result = filter.filter(logger, level, marker, msg, t);
@@ -207,7 +210,7 @@ public final class CompositeFilter imple
 
     /**
      * Filter an event.
-     * 
+     *
      * @param event
      *            The Event to filter on.
      * @return the Result.
@@ -242,14 +245,15 @@ public final class CompositeFilter imple
 
     /**
      * Create a CompositeFilter.
-     * 
+     *
      * @param filters
      *            An array of Filters to call.
      * @return The CompositeFilter.
      */
     @PluginFactory
     public static CompositeFilter createFilters(@PluginElement("filters") final Filter[] filters) {
-        final List<Filter> f = filters == null || filters.length == 0 ? new ArrayList<Filter>() : Arrays.asList(filters);
+        final List<Filter> f = filters == null || filters.length == 0 ?
+            new ArrayList<Filter>() : Arrays.asList(filters);
         return new CompositeFilter(f);
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilter.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilter.java Sun Jan 20 19:59:55 2013
@@ -56,17 +56,20 @@ public final class DynamicThresholdFilte
     }
 
     @Override
-    public Result filter(final Logger logger, final Level level, final Marker marker, final String msg, final Object... params) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final String msg,
+                         final Object... params) {
         return filter(level);
     }
 
     @Override
-    public Result filter(final Logger logger, final Level level, final Marker marker, final Object msg, final Throwable t) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final Object msg,
+                         final Throwable t) {
         return filter(level);
     }
 
     @Override
-    public Result filter(final Logger logger, final Level level, final Marker marker, final Message msg, final Throwable t) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final Message msg,
+                         final Throwable t) {
         return filter(level);
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/MapFilter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/MapFilter.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/MapFilter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/MapFilter.java Sun Jan 20 19:59:55 2013
@@ -42,7 +42,8 @@ public class MapFilter extends AbstractF
 
     private final boolean isAnd;
 
-    protected MapFilter(final Map<String, List<String>> map, final boolean oper, final Result onMatch, final Result onMismatch) {
+    protected MapFilter(final Map<String, List<String>> map, final boolean oper, final Result onMatch,
+                        final Result onMismatch) {
         super(onMatch, onMismatch);
         if (map == null) {
             throw new NullPointerException("key cannot be null");
@@ -52,7 +53,8 @@ public class MapFilter extends AbstractF
     }
 
     @Override
-    public Result filter(final Logger logger, final Level level, final Marker marker, final Message msg, final Throwable t) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final Message msg,
+                         final Throwable t) {
         if (msg instanceof MapMessage) {
             return filter(((MapMessage) msg).getData()) ? onMatch : onMismatch;
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/MarkerFilter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/MarkerFilter.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/MarkerFilter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/MarkerFilter.java Sun Jan 20 19:59:55 2013
@@ -41,17 +41,20 @@ public final class MarkerFilter extends 
     }
 
     @Override
-    public Result filter(final Logger logger, final Level level, final Marker marker, final String msg, final Object... params) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final String msg,
+                         final Object... params) {
         return filter(marker);
     }
 
     @Override
-    public Result filter(final Logger logger, final Level level, final Marker marker, final Object msg, final Throwable t) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final Object msg,
+                         final Throwable t) {
         return filter(marker);
     }
 
     @Override
-    public Result filter(final Logger logger, final Level level, final Marker marker, final Message msg, final Throwable t) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final Message msg,
+                         final Throwable t) {
         return filter(marker);
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/RegexFilter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/RegexFilter.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/RegexFilter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/RegexFilter.java Sun Jan 20 19:59:55 2013
@@ -49,17 +49,20 @@ public final class RegexFilter extends A
     }
 
     @Override
-    public Result filter(final Logger logger, final Level level, final Marker marker, final String msg, final Object... params) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final String msg,
+                         final Object... params) {
         return filter(msg);
     }
 
     @Override
-    public Result filter(final Logger logger, final Level level, final Marker marker, final Object msg, final Throwable t) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final Object msg,
+                         final Throwable t) {
         return filter(msg.toString());
     }
 
     @Override
-    public Result filter(final Logger logger, final Level level, final Marker marker, final Message msg, final Throwable t) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final Message msg,
+                         final Throwable t) {
         final String text = useRawMessage ? msg.getFormat() : msg.getFormattedMessage();
         return filter(text);
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/StructuredDataFilter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/StructuredDataFilter.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/StructuredDataFilter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/StructuredDataFilter.java Sun Jan 20 19:59:55 2013
@@ -39,12 +39,14 @@ import java.util.Map;
 @Plugin(name = "StructuredDataFilter", type = "Core", elementType = "filter", printObject = true)
 public final class StructuredDataFilter extends MapFilter {
 
-    private StructuredDataFilter(final Map<String, List<String>> map, final boolean oper, final Result onMatch, final Result onMismatch) {
+    private StructuredDataFilter(final Map<String, List<String>> map, final boolean oper, final Result onMatch,
+                                 final Result onMismatch) {
         super(map, oper, onMatch, onMismatch);
     }
 
     @Override
-    public Result filter(final Logger logger, final Level level, final Marker marker, final Message msg, final Throwable t) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final Message msg,
+                         final Throwable t) {
         if (msg instanceof StructuredDataMessage) {
             return filter((StructuredDataMessage) msg);
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java Sun Jan 20 19:59:55 2013
@@ -45,7 +45,8 @@ public class ThreadContextMapFilter exte
 
     private final boolean useMap;
 
-    public ThreadContextMapFilter(final Map<String, List<String>> pairs, final boolean oper, final Result onMatch, final Result onMismatch) {
+    public ThreadContextMapFilter(final Map<String, List<String>> pairs, final boolean oper, final Result onMatch,
+                                  final Result onMismatch) {
         super(pairs, oper, onMatch, onMismatch);
         if (pairs.size() == 1) {
             final Iterator<Map.Entry<String, List<String>>> iter = pairs.entrySet().iterator();
@@ -67,17 +68,20 @@ public class ThreadContextMapFilter exte
     }
 
     @Override
-    public Result filter(final Logger logger, final Level level, final Marker marker, final String msg, final Object... params) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final String msg,
+                         final Object... params) {
         return filter();
     }
 
     @Override
-    public Result filter(final Logger logger, final Level level, final Marker marker, final Object msg, final Throwable t) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final Object msg,
+                         final Throwable t) {
         return filter();
     }
 
     @Override
-    public Result filter(final Logger logger, final Level level, final Marker marker, final Message msg, final Throwable t) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final Message msg,
+                         final Throwable t) {
         return filter();
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/ThresholdFilter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/ThresholdFilter.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/ThresholdFilter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/ThresholdFilter.java Sun Jan 20 19:59:55 2013
@@ -44,17 +44,20 @@ public final class ThresholdFilter exten
     }
 
     @Override
-    public Result filter(final Logger logger, final Level level, final Marker marker, final String msg, final Object... params) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final String msg,
+                         final Object... params) {
         return filter(level);
     }
 
     @Override
-    public Result filter(final Logger logger, final Level level, final Marker marker, final Object msg, final Throwable t) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final Object msg,
+                         final Throwable t) {
         return filter(level);
     }
 
     @Override
-    public Result filter(final Logger logger, final Level level, final Marker marker, final Message msg, final Throwable t) {
+    public Result filter(final Logger logger, final Level level, final Marker marker, final Message msg,
+                         final Throwable t) {
         return filter(level);
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/TimeFilter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/TimeFilter.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/TimeFilter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/TimeFilter.java Sun Jan 20 19:59:55 2013
@@ -60,7 +60,8 @@ public final class TimeFilter extends Ab
     private final TimeZone timezone;
 
 
-    private TimeFilter(final long start, final long end, final TimeZone tz, final Result onMatch, final Result onMismatch) {
+    private TimeFilter(final long start, final long end, final TimeZone tz, final Result onMatch,
+                       final Result onMismatch) {
         super(onMatch, onMismatch);
         this.start = start;
         this.end = end;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Charsets.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Charsets.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Charsets.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Charsets.java Sun Jan 20 19:59:55 2013
@@ -23,12 +23,15 @@ import org.apache.logging.log4j.status.S
 /**
  * Charset utilities.
  */
-public class Charsets {
+public final class Charsets {
+
+    private Charsets() {
+    }
 
     /**
-     * Gets a Charset, starting with the preferred {@code charsetName} if supported, if not, use UTF-8, if not supported, use the platform
-     * default.
-     * 
+     * Gets a Charset, starting with the preferred {@code charsetName} if supported, if not, use UTF-8, if not
+     * supported, use the platform default.
+     *
      * @param charsetName
      *            the preferred charset name
      * @return a Charset, not null.
@@ -43,7 +46,8 @@ public class Charsets {
         if (charset == null) {
             charset = Charset.isSupported("UTF-8") ? Charset.forName("UTF-8") : Charset.defaultCharset();
             if (charsetName != null) {
-                StatusLogger.getLogger().error("Charset " + charsetName + " is not supported for layout, using " + charset.displayName());
+                StatusLogger.getLogger().error("Charset " + charsetName + " is not supported for layout, using " +
+                    charset.displayName());
             }
         }
         return charset;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CyclicBuffer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CyclicBuffer.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CyclicBuffer.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CyclicBuffer.java Sun Jan 20 19:59:55 2013
@@ -21,6 +21,7 @@ import java.lang.reflect.Array;
 /**
  * A bounded buffer containing elements of type T. When the number of elements to be added will exceed the
  * size of the buffer the oldest element will be overwritten. Access to the buffer is thread safe.
+ * @param <T> The type of object stored in the buffer.
  */
 public class CyclicBuffer<T> {
     private final T[] ring;
@@ -30,8 +31,10 @@ public class CyclicBuffer<T> {
     private final Class<T> clazz;
 
     /**
-     * Instantiate a new CyclicBuffer of at most <code>maxSize</code>
-     * events.
+     * Instantiate a new CyclicBuffer of at most <code>maxSize</code> events.
+     * @param clazz The Class associate with the type of object in the buffer.
+     * @param size The number of items in the buffer.
+     * @throws IllegalArgumentException if the size is negative.
      */
     public CyclicBuffer(final Class<T> clazz, final int size) throws IllegalArgumentException {
         if (size < 1) {
@@ -48,6 +51,7 @@ public class CyclicBuffer<T> {
 
     /**
      * Add an item as the last event in the buffer.
+     * @param item The item to add to the buffer.
      */
     public synchronized void add(final T item) {
         ring[last] = item;
@@ -62,6 +66,10 @@ public class CyclicBuffer<T> {
         }
     }
 
+    /**
+     * Removes all the elements from the buffer and returns them.
+     * @return An array of the elements in the buffer.
+     */
     public synchronized T[] removeAll() {
         final T[] array = makeArray(clazz, numElems);
         int index = 0;
@@ -76,6 +84,10 @@ public class CyclicBuffer<T> {
         return array;
     }
 
+    /**
+     * Determines if the buffer contains elements.
+     * @return true if the buffer is empty, false otherwise.
+     */
     public boolean isEmpty() {
         return 0 == numElems;
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/FileUtils.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/FileUtils.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/FileUtils.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/FileUtils.java Sun Jan 20 19:59:55 2013
@@ -36,7 +36,7 @@ public final class FileUtils {
 
     private static final String JBOSS_FILE = "vfsfile";
 
-    private static final Logger logger = StatusLogger.getLogger();
+    private static final Logger LOGGER = StatusLogger.getLogger();
 
     private FileUtils() {
     }
@@ -57,16 +57,16 @@ public final class FileUtils {
                 try {
                     uri = new File(uri.getPath()).toURI();
                 } catch (final Exception ex) {
-                    logger.warn("Invalid URI " + uri);
+                    LOGGER.warn("Invalid URI " + uri);
                     return null;
                 }
             }
             try {
                 return new File(URLDecoder.decode(uri.toURL().getFile(), "UTF8"));
             } catch (final MalformedURLException ex) {
-                logger.warn("Invalid URL " + uri, ex);
+                LOGGER.warn("Invalid URL " + uri, ex);
             } catch (final UnsupportedEncodingException uee) {
-                logger.warn("Invalid encoding: UTF8", uee);
+                LOGGER.warn("Invalid encoding: UTF8", uee);
             }
             return null;
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NameUtil.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NameUtil.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NameUtil.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NameUtil.java Sun Jan 20 19:59:55 2013
@@ -23,6 +23,8 @@ import java.security.MessageDigest;
  */
 public final class NameUtil {
 
+    private static final int MASK = 0xff;
+
     private NameUtil() {
     }
 
@@ -41,7 +43,7 @@ public final class NameUtil {
             final byte[] bytes = digest.digest();
             final StringBuilder md5 = new StringBuilder();
             for (final byte b : bytes) {
-                final String hex = Integer.toHexString(0xff & b);
+                final String hex = Integer.toHexString(MASK & b);
                 if (hex.length() == 1) {
                     md5.append('0');
                 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NetUtils.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NetUtils.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NetUtils.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NetUtils.java Sun Jan 20 19:59:55 2013
@@ -30,7 +30,7 @@ import java.util.Enumeration;
  */
 public final class NetUtils {
 
-    private static Logger LOGGER = StatusLogger.getLogger();
+    private static final Logger LOGGER = StatusLogger.getLogger();
 
     private NetUtils() {
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/UUIDUtil.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/UUIDUtil.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/UUIDUtil.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/UUIDUtil.java Sun Jan 20 19:59:55 2013
@@ -176,8 +176,8 @@ public final class UUIDUtil {
      */
     public static UUID getTimeBasedUUID() {
 
-        final long time = ((System.currentTimeMillis() * HUNDRED_NANOS_PER_MILLI) + NUM_100NS_INTERVALS_SINCE_UUID_EPOCH) +
-            (count.incrementAndGet() % HUNDRED_NANOS_PER_MILLI);
+        final long time = ((System.currentTimeMillis() * HUNDRED_NANOS_PER_MILLI) +
+            NUM_100NS_INTERVALS_SINCE_UUID_EPOCH) + (count.incrementAndGet() % HUNDRED_NANOS_PER_MILLI);
         final long timeLow = (time & LOW_MASK) << SHIFT_4;
         final long timeMid = (time & MID_MASK) >> SHIFT_2;
         final long timeHi = (time & HIGH_MASK) >> SHIFT_6;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/Log4jContextFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/Log4jContextFactory.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/Log4jContextFactory.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/Log4jContextFactory.java Sun Jan 20 19:59:55 2013
@@ -30,7 +30,7 @@ import org.apache.logging.log4j.util.Pro
  */
 public class Log4jContextFactory implements LoggerContextFactory {
 
-    private static final StatusLogger logger = StatusLogger.getLogger();
+    private static final StatusLogger LOGGER = StatusLogger.getLogger();
 
     private ContextSelector selector;
 
@@ -47,7 +47,7 @@ public class Log4jContextFactory impleme
                     return;
                 }
             } catch (final Exception ex) {
-                logger.error("Unable to create context " + sel, ex);
+                LOGGER.error("Unable to create context " + sel, ex);
             }
 
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java Sun Jan 20 19:59:55 2013
@@ -59,7 +59,8 @@ public class Log4jLogEvent implements Lo
      * @param message The Message.
      * @param t A Throwable or null.
      */
-    public Log4jLogEvent(final String loggerName, final Marker marker, final String fqcn, final Level level, final Message message, final Throwable t) {
+    public Log4jLogEvent(final String loggerName, final Marker marker, final String fqcn, final Level level,
+                         final Message message, final Throwable t) {
         this(loggerName, marker, fqcn, level, message, null, t);
     }
 
@@ -70,10 +71,11 @@ public class Log4jLogEvent implements Lo
      * @param fqcn The fully qualified class name of the caller.
      * @param level The logging Level.
      * @param message The Message.
+     * @param properties properties to add to the event.
      * @param t A Throwable or null.
      */
-    public Log4jLogEvent(final String loggerName, final Marker marker, final String fqcn, final Level level, final Message message,
-                         final List<Property> properties, final Throwable t) {
+    public Log4jLogEvent(final String loggerName, final Marker marker, final String fqcn, final Level level,
+                         final Message message, final List<Property> properties, final Throwable t) {
         this(loggerName, marker, fqcn, level, message, t,
             createMap(properties),
             ThreadContext.getDepth() == 0 ? null : ThreadContext.cloneStack(), null,
@@ -94,7 +96,8 @@ public class Log4jLogEvent implements Lo
      * @param location The locations of the caller.
      * @param timestamp The timestamp of the event.
      */
-    public Log4jLogEvent(final String loggerName, final Marker marker, final String fqcn, final Level level, final Message message, final Throwable t,
+    public Log4jLogEvent(final String loggerName, final Marker marker, final String fqcn, final Level level,
+                         final Message message, final Throwable t,
                          final Map<String, String> mdc, final ThreadContext.ContextStack ndc, final String threadName,
                          final StackTraceElement location, final long timestamp) {
         name = loggerName;
@@ -102,7 +105,7 @@ public class Log4jLogEvent implements Lo
         this.fqcnOfLogger = fqcn;
         this.level = level;
         this.message = message;
-        this.throwable = t == null ? null : t instanceof ThrowableProxy ? (ThrowableProxy)t : new ThrowableProxy(t);
+        this.throwable = t == null ? null : t instanceof ThrowableProxy ? (ThrowableProxy) t : new ThrowableProxy(t);
         this.mdc = mdc;
         this.ndc = ndc;
         this.timestamp = message instanceof TimestampMessage ? ((TimestampMessage) message).getTimestamp() : timestamp;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java Sun Jan 20 19:59:55 2013
@@ -82,7 +82,8 @@ public class ThrowableProxy extends Thro
      * @param map The cache containing the packaging data.
      * @param cause The Throwable to wrap.
      */
-    private ThrowableProxy(final Throwable parent, final Stack<Class<?>> stack, final Map<String, CacheEntry> map, final Throwable cause) {
+    private ThrowableProxy(final Throwable parent, final Stack<Class<?>> stack, final Map<String, CacheEntry> map,
+                           final Throwable cause) {
         super(cause.getMessage(), null);
         this.name = cause.getClass().getName();
         super.setStackTrace(cause.getStackTrace());
@@ -262,7 +263,8 @@ public class ThrowableProxy extends Thro
         }
     }
 
-    private void formatEntry(final StackTraceElement element, final StackTracePackageElement packageData, final StringBuilder sb) {
+    private void formatEntry(final StackTraceElement element, final StackTracePackageElement packageData,
+                             final StringBuilder sb) {
         sb.append("\tat ");
         sb.append(element);
         sb.append(" ");
@@ -315,7 +317,8 @@ public class ThrowableProxy extends Thro
      * @param stackTrace The stack trace being resolved.
      * @return The StackTracePackageElement array.
      */
-    private StackTracePackageElement[] resolvePackageData(final Stack<Class<?>> stack, final Map<String, CacheEntry> map,
+    private StackTracePackageElement[] resolvePackageData(final Stack<Class<?>> stack, final Map<String,
+                                                          CacheEntry> map,
                                                           final StackTraceElement[] rootTrace,
                                                           final StackTraceElement[] stackTrace) {
         int stackLength;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java Sun Jan 20 19:59:55 2013
@@ -63,6 +63,7 @@ public final class HTMLLayout extends Ab
 
     private final String contentType;
 
+    /**Possible font sizes */
     private enum FontSize {
         SMALLER("smaller"), XXSMALL("xx-small"), XSMALL("x-small"), SMALL("small"), MEDIUM("medium"), LARGE("large"),
         XLARGE("x-large"), XXLARGE("xx-large"),  LARGER("larger");
@@ -292,6 +293,8 @@ public final class HTMLLayout extends Ab
      * @param title The title to include in the file header. If none is specified the default title will be used.
      * @param contentType The content type. Defaults to "text/html".
      * @param charsetName The character set to use. If not specified, the default will be used.
+     * @param fontSize The font size of the text.
+     * @param font The font to use for the text.
      * @return An HTML Layout.
      */
     @PluginFactory

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java Sun Jan 20 19:59:55 2013
@@ -69,6 +69,7 @@ public final class PatternLayout extends
     public static final String SIMPLE_CONVERSION_PATTERN =
         "%d [%t] %p %c - %m%n";
 
+    /** Key to identify pattern converters. */
     public static final String KEY = "Converter";
 
     /**

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java Sun Jan 20 19:59:55 2013
@@ -62,7 +62,7 @@ public final class RFC5424Layout extends
      */
     public static final String DEFAULT_ID = "Audit";
     /**
-     * Match newlines in a platform-independent manner
+     * Match newlines in a platform-independent manner.
      */
     public static final Pattern NEWLINE_PATTERN = Pattern.compile("\\r?\\n");
 
@@ -72,6 +72,8 @@ public final class RFC5424Layout extends
     private static final int MILLIS_PER_MINUTE = 60000;
     private static final int MINUTES_PER_HOUR = 60;
 
+    private static final String COMPONENT_KEY = "RFC5424-Converter";
+
     private final Facility facility;
     private final String defaultId;
     private final Integer enterpriseNumber;
@@ -91,8 +93,6 @@ public final class RFC5424Layout extends
 
     private long lastTimestamp = -1;
     private String timestamppStr;
-    private static final String COMPONENT_KEY = "RFC5424-Converter";
-    private static final String DEFAULT_CONVERSION_PATTERN = "%xEx";
 
     private final List<PatternFormatter> formatters;
 
@@ -233,7 +233,8 @@ public final class RFC5424Layout extends
                 if (mdcRequired != null) {
                     checkRequired(event.getContextMap());
                 }
-                final int ein = id == null || id.getEnterpriseNumber() < 0 ? enterpriseNumber : id.getEnterpriseNumber();
+                final int ein = id == null || id.getEnterpriseNumber() < 0 ?
+                    enterpriseNumber : id.getEnterpriseNumber();
                 final StructuredDataId mdcSDID = new StructuredDataId(mdcId, ein, null, null);
                 formatStructuredElement(mdcSDID, event.getContextMap(), buf, checker);
             }
@@ -259,7 +260,7 @@ public final class RFC5424Layout extends
 
     private String escapeNewlines(final String text, final String escapeNewLine)
     {
-        if(null == escapeNewLine) {
+        if (null == escapeNewLine) {
             return text;
         }
         return NEWLINE_PATTERN.matcher(text).replaceAll(escapeNewLine);
@@ -342,8 +343,8 @@ public final class RFC5424Layout extends
         buf.append(Integer.toString(val));
     }
 
-    private void formatStructuredElement(final StructuredDataId id, final Map<String, String> data, final StringBuilder sb,
-                                         final ListChecker checker) {
+    private void formatStructuredElement(final StructuredDataId id, final Map<String, String> data,
+                                         final StringBuilder sb, final ListChecker checker) {
         if (id == null && defaultId == null) {
             return;
         }
@@ -446,13 +447,14 @@ public final class RFC5424Layout extends
      * record. Defaults to "true:.
      * @param mdcId The id to use for the MDC Structured Data Element.
      * @param includeNL If true, a newline will be appended to the end of the syslog record. The default is false.
-     * @param escapeNL String that should be used to replace newlines within the message text
+     * @param escapeNL String that should be used to replace newlines within the message text.
      * @param appName The value to use as the APP-NAME in the RFC 5424 syslog record.
      * @param msgId The default value to be used in the MSGID field of RFC 5424 syslog records.
      * @param excludes A comma separated list of mdc keys that should be excluded from the LogEvent.
      * @param includes A comma separated list of mdc keys that should be included in the FlumeEvent.
      * @param required A comma separated list of mdc keys that must be present in the MDC.
      * @param charsetName The character set.
+     * @param exceptionPattern The pattern for formatting exceptions.
      * @param config The Configuration. Some Converters require access to the Interpolator.
      * @return An RFC5424Layout.
      */
@@ -485,7 +487,7 @@ public final class RFC5424Layout extends
             mdcId = DEFAULT_MDCID;
         }
 
-        return new RFC5424Layout(config, f, id, enterpriseNumber, isMdc, includeNewLine, escapeNL, mdcId, appName, msgId,
-                                 excludes, includes, required, charset, exceptionPattern);
+        return new RFC5424Layout(config, f, id, enterpriseNumber, isMdc, includeNewLine, escapeNL, mdcId, appName,
+                                 msgId, excludes, includes, required, charset, exceptionPattern);
     }
 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java Sun Jan 20 19:59:55 2013
@@ -40,7 +40,7 @@ import java.util.regex.Pattern;
 @Plugin(name = "SyslogLayout", type = "Core", elementType = "layout", printObject = true)
 public class SyslogLayout extends AbstractStringLayout {
     /**
-     * Match newlines in a platform-independent manner
+     * Match newlines in a platform-independent manner.
      */
     public static final Pattern NEWLINE_PATTERN = Pattern.compile("\\r?\\n");
 
@@ -82,14 +82,13 @@ public class SyslogLayout extends Abstra
         buf.append(" ");
         buf.append(localHostname);
         buf.append(" ");
-        
+
         String message = event.getMessage().getFormattedMessage();
-        if(null != escapeNewLine)
-        {
+        if (null != escapeNewLine) {
             message = NEWLINE_PATTERN.matcher(message).replaceAll(escapeNewLine);
         }
         buf.append(message);
-        
+
         if (includeNewLine) {
             buf.append("\n");
         }
@@ -126,6 +125,7 @@ public class SyslogLayout extends Abstra
      * Create a SyslogLayout.
      * @param facility The Facility is used to try to classify the message.
      * @param includeNL If true a newline will be appended to the result.
+     * @param escapeNL Pattern to use for replacing newlines.
      * @param charsetName The character set.
      * @return A SyslogLayout.
      */

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java Sun Jan 20 19:59:55 2013
@@ -82,7 +82,8 @@ public class XMLLayout extends AbstractS
     private final boolean properties;
     private final boolean complete;
 
-    protected XMLLayout(final boolean locationInfo, final boolean properties, final boolean complete, final Charset charset) {
+    protected XMLLayout(final boolean locationInfo, final boolean properties, final boolean complete,
+                        final Charset charset) {
         super(charset);
         this.locationInfo = locationInfo;
         this.properties = properties;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/lookup/StrSubstitutor.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/lookup/StrSubstitutor.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/lookup/StrSubstitutor.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/lookup/StrSubstitutor.java Sun Jan 20 19:59:55 2013
@@ -178,7 +178,8 @@ public class StrSubstitutor {
      * @param escape  the escape character
      * @throws IllegalArgumentException if the prefix or suffix is null
      */
-    public StrSubstitutor(final Map<String, String> valueMap, final String prefix, final String suffix, final char escape) {
+    public StrSubstitutor(final Map<String, String> valueMap, final String prefix, final String suffix,
+                          final char escape) {
         this(new MapLookup(valueMap), prefix, suffix, escape);
     }
 
@@ -200,7 +201,8 @@ public class StrSubstitutor {
      * @param escape  the escape character
      * @throws IllegalArgumentException if the prefix or suffix is null
      */
-    public StrSubstitutor(final StrLookup variableResolver, final String prefix, final String suffix, final char escape) {
+    public StrSubstitutor(final StrLookup variableResolver, final String prefix, final String suffix,
+                          final char escape) {
         this.setVariableResolver(variableResolver);
         this.setVariablePrefix(prefix);
         this.setVariableSuffix(suffix);
@@ -216,7 +218,8 @@ public class StrSubstitutor {
      * @param escape  the escape character
      * @throws IllegalArgumentException if the prefix or suffix is null
      */
-    public StrSubstitutor(final StrLookup variableResolver, final StrMatcher prefixMatcher, final StrMatcher suffixMatcher,
+    public StrSubstitutor(final StrLookup variableResolver, final StrMatcher prefixMatcher,
+                          final StrMatcher suffixMatcher,
                           final char escape) {
         this.setVariableResolver(variableResolver);
         this.setVariablePrefixMatcher(prefixMatcher);
@@ -248,7 +251,8 @@ public class StrSubstitutor {
      * @return the result of the replace operation
      * @throws IllegalArgumentException if the prefix or suffix is null
      */
-    public static String replace(final Object source, final Map<String, String> valueMap, final String prefix, final String suffix) {
+    public static String replace(final Object source, final Map<String, String> valueMap, final String prefix,
+                                 final String suffix) {
         return new StrSubstitutor(valueMap, prefix, suffix).replace(source);
     }
 
@@ -746,7 +750,8 @@ public class StrSubstitutor {
      * @return the length change that occurs, unless priorVariables is null when the int
      *  represents a boolean flag as to whether any change occurred.
      */
-    private int substitute(final LogEvent event, final StringBuilder buf, final int offset, final int length, List<String> priorVariables) {
+    private int substitute(final LogEvent event, final StringBuilder buf, final int offset, final int length,
+                           List<String> priorVariables) {
         final StrMatcher prefixMatcher = getVariablePrefixMatcher();
         final StrMatcher suffixMatcher = getVariableSuffixMatcher();
         final char escape = getEscapeChar();
@@ -890,8 +895,8 @@ public class StrSubstitutor {
      * @param endPos  the end position of the variable including the suffix, valid
      * @return the variable's value or <b>null</b> if the variable is unknown
      */
-    protected String resolveVariable(final LogEvent event, final String variableName, final StringBuilder buf, final int startPos,
-                                     final int endPos) {
+    protected String resolveVariable(final LogEvent event, final String variableName, final StringBuilder buf,
+                                     final int startPos, final int endPos) {
         final StrLookup resolver = getVariableResolver();
         if (resolver == null) {
             return null;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/AbstractJMSManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/AbstractJMSManager.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/AbstractJMSManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/AbstractJMSManager.java Sun Jan 20 19:59:55 2013
@@ -55,8 +55,9 @@ public abstract class AbstractJMSManager
      * @return the InitialContext.
      * @throws NamingException if a naming error occurs.
      */
-    protected static Context createContext(final String factoryName, final String providerURL, final String urlPkgPrefixes,
-                                           final String securityPrincipalName, final String securityCredentials)
+    protected static Context createContext(final String factoryName, final String providerURL,
+                                           final String urlPkgPrefixes, final String securityPrincipalName,
+                                           final String securityCredentials)
         throws NamingException {
 
         final Properties props = getEnvironment(factoryName, providerURL, urlPkgPrefixes, securityPrincipalName,
@@ -90,8 +91,9 @@ public abstract class AbstractJMSManager
      * @param securityCredentials The security credentials of the Principal.
      * @return The Properties.
      */
-    protected static Properties getEnvironment(final String factoryName, final String providerURL, final String urlPkgPrefixes,
-                                               final String securityPrincipalName, final String securityCredentials) {
+    protected static Properties getEnvironment(final String factoryName, final String providerURL,
+                                               final String urlPkgPrefixes, final String securityPrincipalName,
+                                               final String securityCredentials) {
         final Properties props = new Properties();
         if (factoryName != null) {
             props.put(Context.INITIAL_CONTEXT_FACTORY, factoryName);
@@ -132,7 +134,8 @@ public abstract class AbstractJMSManager
      * @param producer The MessageProducer.
      * @throws Exception if an error occurs.
      */
-    public synchronized void send(final Serializable object, final Session session, final MessageProducer producer) throws Exception {
+    public synchronized void send(final Serializable object, final Session session, final MessageProducer producer)
+        throws Exception {
         try {
             Message msg;
             if (object instanceof String) {

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/AbstractSocketManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/AbstractSocketManager.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/AbstractSocketManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/AbstractSocketManager.java Sun Jan 20 19:59:55 2013
@@ -47,7 +47,8 @@ public abstract class AbstractSocketMana
      * @param host The target host name.
      * @param port The target port number.
      */
-    public AbstractSocketManager(final String name, final OutputStream os, final InetAddress addr, final String host, final int port) {
+    public AbstractSocketManager(final String name, final OutputStream os, final InetAddress addr, final String host,
+                                 final int port) {
         super(os, name);
         this.address = addr;
         this.host = host;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/DatagramSocketManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/DatagramSocketManager.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/DatagramSocketManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/DatagramSocketManager.java Sun Jan 20 19:59:55 2013
@@ -25,7 +25,7 @@ import java.io.OutputStream;
  */
 public class DatagramSocketManager extends AbstractSocketManager {
 
-    private static final DatagramSocketManagerFactory factory = new DatagramSocketManagerFactory();
+    private static final DatagramSocketManagerFactory FACTORY = new DatagramSocketManagerFactory();
 
     /**
      * The Constructor.
@@ -51,7 +51,7 @@ public class DatagramSocketManager exten
         if (port <= 0) {
             throw new IllegalArgumentException("A port value is required");
         }
-        return (DatagramSocketManager) getManager("UDP:" + host + ":" + port, new FactoryData(host, port), factory
+        return (DatagramSocketManager) getManager("UDP:" + host + ":" + port, new FactoryData(host, port), FACTORY
         );
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/Facility.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/Facility.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/Facility.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/Facility.java Sun Jan 20 19:59:55 2013
@@ -99,9 +99,15 @@ public enum Facility {
     /** Local use 7. */
     LOCAL7(23);
 
+    private final int code;
+
+    private Facility(final int code) {
+        this.code = code;
+    }
+
     /**
      * Returns the Facility for the given string.
-     * 
+     *
      * @param name The Facility enum name, case-insensitive. If null, returns, null
      * @return a Facility enum value or null if name is null
      */
@@ -111,7 +117,7 @@ public enum Facility {
 
     /**
      * Returns the Facility for the given string.
-     * 
+     *
      * @param name The Facility enum name, case-insensitive. If null, returns, defaultFacility
      * @param defaultFacility the Facility to return if name is null
      * @return a Facility enum value or null if name is null
@@ -120,12 +126,6 @@ public enum Facility {
         return EnglishEnums.valueOf(Facility.class, name, defaultFacility);
     }
 
-    private final int code;
-
-    private Facility(final int code) {
-        this.code = code;
-    }
-
     /**
      * Retrieve the value of the enumeration.
      * @return The value associated with the enumeration.

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueManager.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueManager.java Sun Jan 20 19:59:55 2013
@@ -34,7 +34,7 @@ import java.io.Serializable;
  */
 public class JMSQueueManager extends AbstractJMSManager {
 
-    private static final JMSQueueManagerFactory factory = new JMSQueueManagerFactory();
+    private static final JMSQueueManagerFactory FACTORY = new JMSQueueManagerFactory();
 
     private QueueInfo info;
     private final String factoryBindingName;
@@ -53,8 +53,9 @@ public class JMSQueueManager extends Abs
      * @param password The credentials for the user.
      * @param info The Queue connection info.
      */
-    protected JMSQueueManager(final String name, final Context context, final String factoryBindingName, final String queueBindingName,
-                              final String userName, final String password, final QueueInfo info) {
+    protected JMSQueueManager(final String name, final Context context, final String factoryBindingName,
+                              final String queueBindingName, final String userName, final String password,
+                              final QueueInfo info) {
         super(name);
         this.context = context;
         this.factoryBindingName = factoryBindingName;
@@ -78,10 +79,11 @@ public class JMSQueueManager extends Abs
      * @param password The password to use to create the Queue Connection.
      * @return The JMSQueueManager.
      */
-    public static JMSQueueManager getJMSQueueManager(final String factoryName, final String providerURL, final String urlPkgPrefixes,
-                                                     final String securityPrincipalName, final String securityCredentials,
-                                                     final String factoryBindingName, final String queueBindingName,
-                                                     final String userName, final String password) {
+    public static JMSQueueManager getJMSQueueManager(final String factoryName, final String providerURL,
+                                                     final String urlPkgPrefixes, final String securityPrincipalName,
+                                                     final String securityCredentials, final String factoryBindingName,
+                                                     final String queueBindingName, final String userName,
+                                                     final String password) {
 
         if (factoryBindingName == null) {
             LOGGER.error("No factory name provided for JMSQueueManager");
@@ -93,7 +95,7 @@ public class JMSQueueManager extends Abs
         }
 
         final String name = "JMSQueue:" + factoryBindingName + '.' + queueBindingName;
-        return getManager(name, factory, new FactoryData(factoryName, providerURL, urlPkgPrefixes,
+        return getManager(name, FACTORY, new FactoryData(factoryName, providerURL, urlPkgPrefixes,
             securityPrincipalName, securityCredentials, factoryBindingName, queueBindingName, userName, password));
     }
 
@@ -149,9 +151,10 @@ public class JMSQueueManager extends Abs
         private final String userName;
         private final String password;
 
-        public FactoryData(final String factoryName, final String providerURL, final String urlPkgPrefixes, final String securityPrincipalName,
-                           final String securityCredentials, final String factoryBindingName, final String queueBindingName,
-                           final String userName, final String password) {
+        public FactoryData(final String factoryName, final String providerURL, final String urlPkgPrefixes,
+                           final String securityPrincipalName, final String securityCredentials,
+                           final String factoryBindingName, final String queueBindingName, final String userName,
+                           final String password) {
             this.factoryName = factoryName;
             this.providerURL = providerURL;
             this.urlPkgPrefixes = urlPkgPrefixes;
@@ -164,8 +167,9 @@ public class JMSQueueManager extends Abs
         }
     }
 
-    private static QueueInfo connect(final Context context, final String factoryBindingName, final String queueBindingName,
-                                     final String userName, final String password, final boolean suppress) throws Exception {
+    private static QueueInfo connect(final Context context, final String factoryBindingName,
+                                     final String queueBindingName, final String userName, final String password,
+                                     final boolean suppress) throws Exception {
         try {
             final QueueConnectionFactory factory = (QueueConnectionFactory) lookup(context, factoryBindingName);
             QueueConnection conn;
@@ -193,6 +197,7 @@ public class JMSQueueManager extends Abs
         return null;
     }
 
+    /** Queue connection information */
     private static class QueueInfo {
         private final QueueConnection conn;
         private final QueueSession session;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueReceiver.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueReceiver.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueReceiver.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueReceiver.java Sun Jan 20 19:59:55 2013
@@ -42,7 +42,8 @@ public class JMSQueueReceiver extends Ab
      * @param username The userid to connect to the queue.
      * @param password The password to connect to the queue.
      */
-    public JMSQueueReceiver(final String qcfBindingName, final String queueBindingName, final String username, final String password) {
+    public JMSQueueReceiver(final String qcfBindingName, final String queueBindingName, final String username,
+                            final String password) {
 
         try {
             final Context ctx = new InitialContext();

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java Sun Jan 20 19:59:55 2013
@@ -34,7 +34,7 @@ import java.io.Serializable;
  */
 public class JMSTopicManager extends AbstractJMSManager {
 
-    private static final JMSTopicManagerFactory factory = new JMSTopicManagerFactory();
+    private static final JMSTopicManagerFactory FACTORY = new JMSTopicManagerFactory();
 
     private TopicInfo info;
     private final String factoryBindingName;
@@ -52,8 +52,9 @@ public class JMSTopicManager extends Abs
      * @param password The credentials for the user.
      * @param info The Queue connection info.
      */
-    protected JMSTopicManager(final String name, final Context context, final String factoryBindingName, final String topicBindingName,
-                              final String userName, final String password, final TopicInfo info) {
+    protected JMSTopicManager(final String name, final Context context, final String factoryBindingName,
+                              final String topicBindingName, final String userName, final String password,
+                              final TopicInfo info) {
         super(name);
         this.context = context;
         this.factoryBindingName = factoryBindingName;
@@ -77,10 +78,11 @@ public class JMSTopicManager extends Abs
      * @param password The password to use to create the Topic Connection.
      * @return A JMSTopicManager.
      */
-    public static JMSTopicManager getJMSTopicManager(final String factoryName, final String providerURL, final String urlPkgPrefixes,
-                                                     final String securityPrincipalName, final String securityCredentials,
-                                                     final String factoryBindingName, final String topicBindingName,
-                                                     final String userName, final String password) {
+    public static JMSTopicManager getJMSTopicManager(final String factoryName, final String providerURL,
+                                                     final String urlPkgPrefixes, final String securityPrincipalName,
+                                                     final String securityCredentials, final String factoryBindingName,
+                                                     final String topicBindingName, final String userName,
+                                                     final String password) {
 
         if (factoryBindingName == null) {
             LOGGER.error("No factory name provided for JMSTopicManager");
@@ -92,7 +94,7 @@ public class JMSTopicManager extends Abs
         }
 
         final String name = "JMSTopic:" + factoryBindingName + '.' + topicBindingName;
-        return getManager(name, factory, new FactoryData(factoryName, providerURL, urlPkgPrefixes,
+        return getManager(name, FACTORY, new FactoryData(factoryName, providerURL, urlPkgPrefixes,
             securityPrincipalName, securityCredentials, factoryBindingName, topicBindingName, userName, password));
     }
 
@@ -150,8 +152,9 @@ public class JMSTopicManager extends Abs
         private final String userName;
         private final String password;
 
-        public FactoryData(final String factoryName, final String providerURL, final String urlPkgPrefixes, final String securityPrincipalName,
-                           final String securityCredentials, final String factoryBindingName, final String topicBindingName,
+        public FactoryData(final String factoryName, final String providerURL, final String urlPkgPrefixes,
+                           final String securityPrincipalName, final String securityCredentials,
+                           final String factoryBindingName, final String topicBindingName,
                            final String userName, final String password) {
             this.factoryName = factoryName;
             this.providerURL = providerURL;
@@ -165,8 +168,9 @@ public class JMSTopicManager extends Abs
         }
     }
 
-    private static TopicInfo connect(final Context context, final String factoryBindingName, final String queueBindingName,
-                                     final String userName, final String password, final boolean suppress) throws Exception {
+    private static TopicInfo connect(final Context context, final String factoryBindingName,
+                                     final String queueBindingName, final String userName, final String password,
+                                     final boolean suppress) throws Exception {
         try {
             final TopicConnectionFactory factory = (TopicConnectionFactory) lookup(context, factoryBindingName);
             TopicConnection conn;
@@ -194,6 +198,7 @@ public class JMSTopicManager extends Abs
         return null;
     }
 
+    /** Topic connection information */
     private static class TopicInfo {
         private final TopicConnection conn;
         private final TopicSession session;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicReceiver.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicReceiver.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicReceiver.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicReceiver.java Sun Jan 20 19:59:55 2013
@@ -42,7 +42,8 @@ public class JMSTopicReceiver extends Ab
      * @param username The userid to connect to the topic.
      * @param password The password to connect to the topic.
      */
-    public JMSTopicReceiver(final String tcfBindingName, final String topicBindingName, final String username, final String password) {
+    public JMSTopicReceiver(final String tcfBindingName, final String topicBindingName, final String username,
+                            final String password) {
         try {
             final Context ctx = new InitialContext();
             TopicConnectionFactory topicConnectionFactory;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/MimeMessageBuilder.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/MimeMessageBuilder.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/MimeMessageBuilder.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/MimeMessageBuilder.java Sun Jan 20 19:59:55 2013
@@ -24,7 +24,7 @@ import javax.mail.internet.InternetAddre
 import javax.mail.internet.MimeMessage;
 
 /**
- *  Helper class for SMTPManager
+ *  Helper class for SMTPManager.
  */
 public class MimeMessageBuilder {
     private final MimeMessage message;
@@ -85,4 +85,4 @@ public class MimeMessageBuilder {
     private static InternetAddress[] parseAddresses(final String addresses) throws AddressException {
         return addresses == null ? null : InternetAddress.parse(addresses, true);
     }
-}
\ No newline at end of file
+}

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java Sun Jan 20 19:59:55 2013
@@ -6,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License. You may obtain a copy of the License at
  *
- *	  http://www.apache.org/licenses/LICENSE-2.0
+ *      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,
@@ -46,8 +46,11 @@ import org.apache.logging.log4j.core.hel
 import org.apache.logging.log4j.core.helpers.NetUtils;
 import org.apache.logging.log4j.util.PropertiesUtil;
 
+/**
+ * Manager for sending SMTP events.
+ */
 public class SMTPManager extends AbstractManager {
-    private static final SMTPManagerFactory factory = new SMTPManagerFactory();
+    private static final SMTPManagerFactory FACTORY = new SMTPManagerFactory();
 
     private final Session session;
 
@@ -117,20 +120,21 @@ public class SMTPManager extends Abstrac
 
         final String name = "SMTP:" + NameUtil.md5(sb.toString());
 
-        return getManager(name, factory, new FactoryData(to, cc, bcc, from, replyTo, subject,
+        return getManager(name, FACTORY, new FactoryData(to, cc, bcc, from, replyTo, subject,
             protocol, host, port, username, password, isDebug, numElements));
     }
 
     /**
      * Send the contents of the cyclic buffer as an e-mail message.
-     * @param appendEvent
+     * @param layout The layout for formatting the events.
+     * @param appendEvent The event that triggered the send.
      */
     public void sendEvents(final Layout<?> layout, final LogEvent appendEvent) {
         if (message == null) {
             connect();
         }
         try {
-        	final LogEvent[] priorEvents = buffer.removeAll();
+            final LogEvent[] priorEvents = buffer.removeAll();
             final byte[] rawBytes = formatContentToBytes(priorEvents, appendEvent, layout);
 
             final String contentType = layout.getContentType();
@@ -153,13 +157,15 @@ public class SMTPManager extends Abstrac
         }
     }
 
-    protected byte[] formatContentToBytes(final LogEvent[] priorEvents, final LogEvent appendEvent, final Layout<?> layout) throws IOException {
+    protected byte[] formatContentToBytes(final LogEvent[] priorEvents, final LogEvent appendEvent,
+                                          final Layout<?> layout) throws IOException {
         final ByteArrayOutputStream raw = new ByteArrayOutputStream();
         writeContent(priorEvents, appendEvent, layout, raw);
         return raw.toByteArray();
     }
 
-    private void writeContent(final LogEvent[] priorEvents, final LogEvent appendEvent, final Layout<?> layout, final ByteArrayOutputStream out)
+    private void writeContent(final LogEvent[] priorEvents, final LogEvent appendEvent, final Layout<?> layout,
+                              final ByteArrayOutputStream out)
         throws IOException {
         writeHeader(layout, out);
         writeBuffer(priorEvents, appendEvent, layout, out);
@@ -173,7 +179,8 @@ public class SMTPManager extends Abstrac
         }
     }
 
-    protected void writeBuffer(final LogEvent[] priorEvents, final LogEvent appendEvent, final Layout<?> layout, final OutputStream out) throws IOException {
+    protected void writeBuffer(final LogEvent[] priorEvents, final LogEvent appendEvent, final Layout<?> layout,
+                               final OutputStream out) throws IOException {
         for (final LogEvent priorEvent : priorEvents) {
             final byte[] bytes = layout.toByteArray(priorEvent);
             out.write(bytes);
@@ -195,7 +202,8 @@ public class SMTPManager extends Abstrac
         return MimeUtility.getEncoding(dataSource);
     }
 
-    protected byte[] encodeContentToBytes(final byte[] rawBytes, final String encoding) throws MessagingException, IOException {
+    protected byte[] encodeContentToBytes(final byte[] rawBytes, final String encoding)
+        throws MessagingException, IOException {
         final ByteArrayOutputStream encoded = new ByteArrayOutputStream();
         encodeContent(rawBytes, encoding, encoded);
         return encoded.toByteArray();
@@ -215,7 +223,8 @@ public class SMTPManager extends Abstrac
         return headers;
     }
 
-    protected MimeMultipart getMimeMultipart(final byte[] encodedBytes, final InternetHeaders headers) throws MessagingException {
+    protected MimeMultipart getMimeMultipart(final byte[] encodedBytes, final InternetHeaders headers)
+        throws MessagingException {
         final MimeMultipart mp = new MimeMultipart();
         final MimeBodyPart part = new MimeBodyPart(headers, encodedBytes);
         mp.addBodyPart(part);
@@ -230,6 +239,9 @@ public class SMTPManager extends Abstrac
         }
     }
 
+    /**
+     * Factory data.
+     */
     private static class FactoryData {
         private final String to;
         private final String cc;
@@ -278,6 +290,9 @@ public class SMTPManager extends Abstrac
         }
     }
 
+    /**
+     * Factory to create the SMTP Manager.
+     */
     private static class SMTPManagerFactory implements ManagerFactory<SMTPManager, FactoryData> {
 
         public SMTPManager createManager(final String name, final FactoryData data) {
@@ -322,7 +337,8 @@ public class SMTPManager extends Abstrac
         private Authenticator buildAuthenticator(final String username, final String password) {
             if (null != password && null != username) {
                 return new Authenticator() {
-                    private final PasswordAuthentication passwordAuthentication = new PasswordAuthentication(username, password);
+                    private final PasswordAuthentication passwordAuthentication =
+                        new PasswordAuthentication(username, password);
 
                     @Override
                     protected PasswordAuthentication getPasswordAuthentication() {

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SocketServer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SocketServer.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SocketServer.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SocketServer.java Sun Jan 20 19:59:55 2013
@@ -66,7 +66,6 @@ public class SocketServer extends Abstra
         server = new ServerSocket(port);
         if (logger == null) {
             logger = LogManager.getLogger(this);
-            // TODO: Consider
             // logger = LogManager.getLogger(getClass().getName() + '.' + port);
         }
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/TCPSocketManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/TCPSocketManager.java?rev=1435937&r1=1435936&r2=1435937&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/TCPSocketManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/TCPSocketManager.java Sun Jan 20 19:59:55 2013
@@ -42,7 +42,7 @@ public class TCPSocketManager extends Ab
      */
     private static final int DEFAULT_PORT = 4560;
 
-    private static final TCPSocketManagerFactory factory = new TCPSocketManagerFactory();
+    private static final TCPSocketManagerFactory FACTORY = new TCPSocketManagerFactory();
 
     private final int reconnectionDelay;
 
@@ -62,8 +62,8 @@ public class TCPSocketManager extends Ab
      * @param port The port number on the host.
      * @param delay Reconnection interval.
      */
-    public TCPSocketManager(final String name, final OutputStream os, final Socket sock, final InetAddress addr, final String host, final int port,
-                            final int delay) {
+    public TCPSocketManager(final String name, final OutputStream os, final Socket sock, final InetAddress addr,
+                            final String host, final int port, final int delay) {
         super(name, os, addr, host, port);
         this.reconnectionDelay = delay;
         this.socket = sock;
@@ -93,7 +93,7 @@ public class TCPSocketManager extends Ab
         if (delay == 0) {
             delay = DEFAULT_RECONNECTION_DELAY;
         }
-        return (TCPSocketManager) getManager("TCP:" + host + ":" + port, new FactoryData(host, port, delay), factory);
+        return (TCPSocketManager) getManager("TCP:" + host + ":" + port, new FactoryData(host, port, delay), FACTORY);
     }
 
     @Override
@@ -136,9 +136,9 @@ public class TCPSocketManager extends Ab
      */
     private class Reconnector extends Thread {
 
-        private boolean shutdown = false;
+        private CountDownLatch latch = new CountDownLatch(1);
 
-        public CountDownLatch latch = new CountDownLatch(1);
+        private boolean shutdown = false;
 
         private final Object owner;
 



Mime
View raw message