logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1501104 [2/5] - in /logging/log4j/log4j2/trunk: api/src/main/java/org/apache/logging/log4j/ api/src/main/java/org/apache/logging/log4j/message/ api/src/main/java/org/apache/logging/log4j/simple/ api/src/main/java/org/apache/logging/log4j/s...
Date Tue, 09 Jul 2013 06:08:28 GMT
Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java Tue Jul  9 06:08:25 2013
@@ -53,10 +53,10 @@ public final class RollingFileAppender<T
     private RollingFileAppender(final String name, final Layout<T> layout, final Filter filter,
                                 final RollingFileManager manager, final String fileName,
                                 final String filePattern, final boolean handleException, final boolean immediateFlush,
-                                Advertiser advertiser) {
+                                final Advertiser advertiser) {
         super(name, layout, filter, handleException, immediateFlush, manager);
         if (advertiser != null) {
-            Map<String, String> configuration = new HashMap<String, String>(layout.getContentFormat());
+            final Map<String, String> configuration = new HashMap<String, String>(layout.getContentFormat());
             configuration.put("contentType", layout.getContentType());
             configuration.put("name", name);
             advertisement = advertiser.advertise(configuration);
@@ -143,7 +143,7 @@ public final class RollingFileAppender<T
         final boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
         final boolean isBuffered = bufferedIO == null ? true : Boolean.valueOf(bufferedIO);
         final boolean isFlush = immediateFlush == null ? true : Boolean.valueOf(immediateFlush);
-        boolean isAdvertise = advertise == null ? false : Boolean.valueOf(advertise);
+        final boolean isAdvertise = advertise == null ? false : Boolean.valueOf(advertise);
         if (name == null) {
             LOGGER.error("No name provided for FileAppender");
             return null;
@@ -170,6 +170,7 @@ public final class RollingFileAppender<T
 
         if (layout == null) {
             @SuppressWarnings({ "unchecked", "UnnecessaryLocalVariable" })
+            final
             Layout<S> l = (Layout<S>) PatternLayout.createLayout(null, null, null, null, null);
             layout = l;
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SMTPAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SMTPAppender.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SMTPAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SMTPAppender.java Tue Jul  9 06:08:25 2013
@@ -135,6 +135,7 @@ public final class SMTPAppender<T extend
 
         if (layout == null) {
             @SuppressWarnings({ "unchecked", "UnnecessaryLocalVariable" })
+            final
             Layout<S> l = (Layout<S>) HTMLLayout.createLayout(null, null, null, null, null, null);
             layout = l;
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SocketAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SocketAppender.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SocketAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SocketAppender.java Tue Jul  9 06:08:25 2013
@@ -48,10 +48,10 @@ public class SocketAppender<T extends Se
 
     protected SocketAppender(final String name, final Layout<T> layout, final Filter filter,
                              final AbstractSocketManager manager, final boolean handleException,
-                             final boolean immediateFlush, Advertiser advertiser) {
+                             final boolean immediateFlush, final Advertiser advertiser) {
         super(name, layout, filter, handleException, immediateFlush, manager);
         if (advertiser != null) {
-            Map<String, String> configuration = new HashMap<String, String>(layout.getContentFormat());
+            final Map<String, String> configuration = new HashMap<String, String>(layout.getContentFormat());
             configuration.putAll(manager.getContentFormat());
             configuration.put("contentType", layout.getContentType());
             configuration.put("name", name);
@@ -101,13 +101,14 @@ public class SocketAppender<T extends Se
                                                 @PluginConfiguration final Configuration config) {
 
         boolean isFlush = immediateFlush == null ? true : Boolean.valueOf(immediateFlush);
-        boolean isAdvertise = advertise == null ? false : Boolean.valueOf(advertise);
+        final boolean isAdvertise = advertise == null ? false : Boolean.valueOf(advertise);
         final boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
         final boolean fail = immediateFail == null ? true : Boolean.valueOf(immediateFail);
         final int reconnectDelay = delay == null ? 0 : Integer.parseInt(delay);
         final int port = portNum == null ? 0 : Integer.parseInt(portNum);
         if (layout == null) {
             @SuppressWarnings({ "unchecked", "UnnecessaryLocalVariable" })
+            final
             Layout<S> l = (Layout<S>) SerializedLayout.createLayout();
             layout = l;
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java Tue Jul  9 06:08:25 2013
@@ -48,7 +48,7 @@ public class SyslogAppender<T extends Se
 
     protected SyslogAppender(final String name, final Layout<T> layout, final Filter filter,
                              final boolean handleException, final boolean immediateFlush,
-                             final AbstractSocketManager manager, Advertiser advertiser) {
+                             final AbstractSocketManager manager, final Advertiser advertiser) {
         super(name, layout, filter, manager, handleException, immediateFlush, advertiser);
 
     }
@@ -118,7 +118,7 @@ public class SyslogAppender<T extends Se
                                                 @PluginConfiguration final Configuration config,
                                                 @PluginAttr("charset") final String charsetName,
                                                 @PluginAttr("exceptionPattern") final String exceptionPattern,
-                                                @PluginElement("LoggerFields") LoggerFields loggerFields,
+                                                @PluginElement("LoggerFields") final LoggerFields loggerFields,
                                                 @PluginAttr("advertise") final String advertise) {
 
         final boolean isFlush = immediateFlush == null ? true : Boolean.valueOf(immediateFlush);
@@ -126,7 +126,7 @@ public class SyslogAppender<T extends Se
         final int reconnectDelay = delay == null ? 0 : Integer.parseInt(delay);
         final boolean fail = immediateFail == null ? true : Boolean.valueOf(immediateFail);
         final int port = portNum == null ? 0 : Integer.parseInt(portNum);
-        boolean isAdvertise = advertise == null ? false : Boolean.valueOf(advertise);
+        final boolean isAdvertise = advertise == null ? false : Boolean.valueOf(advertise);
         @SuppressWarnings("unchecked")
         final Layout<S> layout = (Layout<S>) (RFC5424.equalsIgnoreCase(format) ?
             RFC5424Layout.createLayout(facility, id, ein, includeMDC, mdcId, mdcPrefix, eventPrefix, includeNL,

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/AbstractLogEventWrapperEntity.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/AbstractLogEventWrapperEntity.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/AbstractLogEventWrapperEntity.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/AbstractLogEventWrapperEntity.java Tue Jul  9 06:08:25 2013
@@ -309,7 +309,7 @@ public abstract class AbstractLogEventWr
         }
 
         @Override
-        public void setIncludeLocation(boolean locationRequired) {
+        public void setIncludeLocation(final boolean locationRequired) {
 
         }
 
@@ -319,7 +319,7 @@ public abstract class AbstractLogEventWr
         }
 
         @Override
-        public void setEndOfBatch(boolean endOfBatch) {
+        public void setEndOfBatch(final boolean endOfBatch) {
 
         }
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextMapJsonAttributeConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextMapJsonAttributeConverter.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextMapJsonAttributeConverter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextMapJsonAttributeConverter.java Tue Jul  9 06:08:25 2013
@@ -43,7 +43,7 @@ public class ContextMapJsonAttributeConv
 
         try {
             return OBJECT_MAPPER.writeValueAsString(contextMap);
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new PersistenceException("Failed to convert map to JSON string.", e);
         }
     }
@@ -55,7 +55,7 @@ public class ContextMapJsonAttributeConv
         }
         try {
             return OBJECT_MAPPER.readValue(s, new TypeReference<Map<String, String>>() { });
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new PersistenceException("Failed to convert JSON string to map.", e);
         }
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextStackAttributeConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextStackAttributeConverter.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextStackAttributeConverter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextStackAttributeConverter.java Tue Jul  9 06:08:25 2013
@@ -36,8 +36,8 @@ public class ContextStackAttributeConver
             return null;
         }
 
-        StringBuilder builder = new StringBuilder();
-        for (String value : contextStack.asList()) {
+        final StringBuilder builder = new StringBuilder();
+        for (final String value : contextStack.asList()) {
             if (builder.length() > 0) {
                 builder.append('\n');
             }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextStackJsonAttributeConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextStackJsonAttributeConverter.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextStackJsonAttributeConverter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextStackJsonAttributeConverter.java Tue Jul  9 06:08:25 2013
@@ -43,7 +43,7 @@ public class ContextStackJsonAttributeCo
 
         try {
             return ContextMapJsonAttributeConverter.OBJECT_MAPPER.writeValueAsString(contextStack.asList());
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new PersistenceException("Failed to convert stack list to JSON string.", e);
         }
     }
@@ -57,11 +57,11 @@ public class ContextStackJsonAttributeCo
         List<String> list;
         try {
             list = ContextMapJsonAttributeConverter.OBJECT_MAPPER.readValue(s, new TypeReference<List<String>>() { });
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new PersistenceException("Failed to convert JSON string to list for stack.", e);
         }
 
-        DefaultThreadContextStack result = new DefaultThreadContextStack(true);
+        final DefaultThreadContextStack result = new DefaultThreadContextStack(true);
         result.addAll(list);
         return result;
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/MarkerAttributeConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/MarkerAttributeConverter.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/MarkerAttributeConverter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/MarkerAttributeConverter.java Tue Jul  9 06:08:25 2013
@@ -34,7 +34,7 @@ public class MarkerAttributeConverter im
             return null;
         }
 
-        StringBuilder builder = new StringBuilder(marker.getName());
+        final StringBuilder builder = new StringBuilder(marker.getName());
         Marker parent = marker.getParent();
         int levels = 0;
         boolean hasParent = false;
@@ -59,7 +59,7 @@ public class MarkerAttributeConverter im
             return null;
         }
 
-        int bracket = s.indexOf("[");
+        final int bracket = s.indexOf("[");
 
         return bracket < 1 ? MarkerManager.getMarker(s) : MarkerManager.getMarker(s.substring(0, bracket));
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/StackTraceElementAttributeConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/StackTraceElementAttributeConverter.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/StackTraceElementAttributeConverter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/StackTraceElementAttributeConverter.java Tue Jul  9 06:08:25 2013
@@ -46,25 +46,25 @@ public class StackTraceElementAttributeC
     }
 
     static StackTraceElement convertString(final String s) {
-        int open = s.indexOf("(");
+        final int open = s.indexOf("(");
 
-        String classMethod = s.substring(0, open);
-        String className = classMethod.substring(0, classMethod.lastIndexOf("."));
-        String methodName = classMethod.substring(classMethod.lastIndexOf(".") + 1);
+        final String classMethod = s.substring(0, open);
+        final String className = classMethod.substring(0, classMethod.lastIndexOf("."));
+        final String methodName = classMethod.substring(classMethod.lastIndexOf(".") + 1);
 
-        String parenthesisContents = s.substring(open + 1, s.indexOf(")"));
+        final String parenthesisContents = s.substring(open + 1, s.indexOf(")"));
 
         String fileName = null;
         int lineNumber = UNKNOWN_SOURCE;
         if ("Native Method".equals(parenthesisContents)) {
             lineNumber = NATIVE_METHOD;
         } else if (!"Unknown Source".equals(parenthesisContents)) {
-            int colon = parenthesisContents.indexOf(":");
+            final int colon = parenthesisContents.indexOf(":");
             if (colon > UNKNOWN_SOURCE) {
                 fileName = parenthesisContents.substring(0, colon);
                 try {
                     lineNumber = Integer.parseInt(parenthesisContents.substring(colon + 1));
-                } catch (NumberFormatException ignore) {
+                } catch (final NumberFormatException ignore) {
                     // we don't care
                 }
             } else {

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ThrowableAttributeConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ThrowableAttributeConverter.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ThrowableAttributeConverter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ThrowableAttributeConverter.java Tue Jul  9 06:08:25 2013
@@ -43,7 +43,7 @@ public class ThrowableAttributeConverter
             THROWABLE_CAUSE.setAccessible(true);
             THROWABLE_MESSAGE = Throwable.class.getDeclaredField("detailMessage");
             THROWABLE_MESSAGE.setAccessible(true);
-        } catch (NoSuchFieldException e) {
+        } catch (final NoSuchFieldException e) {
             throw new IllegalStateException("Something is wrong with java.lang.Throwable.", e);
         }
     }
@@ -54,14 +54,14 @@ public class ThrowableAttributeConverter
             return null;
         }
 
-        StringBuilder builder = new StringBuilder();
+        final StringBuilder builder = new StringBuilder();
         this.convertThrowable(builder, throwable);
         return builder.toString();
     }
 
     private void convertThrowable(final StringBuilder builder, final Throwable throwable) {
         builder.append(throwable.toString()).append('\n');
-        for (StackTraceElement element : throwable.getStackTrace()) {
+        for (final StackTraceElement element : throwable.getStackTrace()) {
             builder.append("\tat ").append(element).append('\n');
         }
         if (throwable.getCause() != null) {
@@ -76,16 +76,16 @@ public class ThrowableAttributeConverter
             return null;
         }
 
-        List<String> lines = Arrays.asList(s.split("(\n|\r\n)"));
+        final List<String> lines = Arrays.asList(s.split("(\n|\r\n)"));
         return this.convertString(lines.listIterator(), false);
     }
 
-    private Throwable convertString(final ListIterator<String> lines, boolean removeCausedBy) {
+    private Throwable convertString(final ListIterator<String> lines, final boolean removeCausedBy) {
         String firstLine = lines.next();
         if (removeCausedBy) {
             firstLine = firstLine.substring(CAUSED_BY_STRING_LENGTH);
         }
-        int colon = firstLine.indexOf(":");
+        final int colon = firstLine.indexOf(":");
         String throwableClassName;
         String message = null;
         if (colon > 1) {
@@ -97,10 +97,10 @@ public class ThrowableAttributeConverter
             throwableClassName = firstLine;
         }
 
-        List<StackTraceElement> stackTrace = new ArrayList<StackTraceElement>();
+        final List<StackTraceElement> stackTrace = new ArrayList<StackTraceElement>();
         Throwable cause = null;
         while (lines.hasNext()) {
-            String line = lines.next();
+            final String line = lines.next();
 
             if (line.startsWith("Caused by ")) {
                 lines.previous();
@@ -121,6 +121,7 @@ public class ThrowableAttributeConverter
                                    final StackTraceElement[] stackTrace) {
         try {
             @SuppressWarnings("unchecked")
+            final
             Class<Throwable> throwableClass = (Class<Throwable>) Class.forName(throwableClassName);
 
             if (!Throwable.class.isAssignableFrom(throwableClass)) {
@@ -172,7 +173,7 @@ public class ThrowableAttributeConverter
             }
             throwable.setStackTrace(stackTrace);
             return throwable;
-        } catch (Exception e) {
+        } catch (final Exception e) {
             return null;
         }
     }
@@ -180,9 +181,10 @@ public class ThrowableAttributeConverter
     private Throwable getThrowable(final Class<Throwable> throwableClass, final String message, final Throwable cause) {
         try {
             @SuppressWarnings("unchecked")
+            final
             Constructor<Throwable>[] constructors = (Constructor<Throwable>[]) throwableClass.getConstructors();
-            for (Constructor<Throwable> constructor : constructors) {
-                Class<?>[] parameterTypes = constructor.getParameterTypes();
+            for (final Constructor<Throwable> constructor : constructors) {
+                final Class<?>[] parameterTypes = constructor.getParameterTypes();
                 if (parameterTypes.length == 2) {
                     if (String.class == parameterTypes[0] && Throwable.class.isAssignableFrom(parameterTypes[1])) {
                         return constructor.newInstance(message, cause);
@@ -193,7 +195,7 @@ public class ThrowableAttributeConverter
                 }
             }
             return null;
-        } catch (Exception e) {
+        } catch (final Exception e) {
             return null;
         }
     }
@@ -201,15 +203,16 @@ public class ThrowableAttributeConverter
     private Throwable getThrowable(final Class<Throwable> throwableClass, final Throwable cause) {
         try {
             @SuppressWarnings("unchecked")
+            final
             Constructor<Throwable>[] constructors = (Constructor<Throwable>[]) throwableClass.getConstructors();
-            for (Constructor<Throwable> constructor : constructors) {
-                Class<?>[] parameterTypes = constructor.getParameterTypes();
+            for (final Constructor<Throwable> constructor : constructors) {
+                final Class<?>[] parameterTypes = constructor.getParameterTypes();
                 if (parameterTypes.length == 1 && Throwable.class.isAssignableFrom(parameterTypes[0])) {
                     return constructor.newInstance(cause);
                 }
             }
             return null;
-        } catch (Exception e) {
+        } catch (final Exception e) {
             return null;
         }
     }
@@ -217,7 +220,7 @@ public class ThrowableAttributeConverter
     private Throwable getThrowable(final Class<Throwable> throwableClass, final String message) {
         try {
             return throwableClass.getConstructor(String.class).newInstance(message);
-        } catch (Exception e) {
+        } catch (final Exception e) {
             return null;
         }
     }
@@ -225,7 +228,7 @@ public class ThrowableAttributeConverter
     private Throwable getThrowable(final Class<Throwable> throwableClass) {
         try {
             return throwableClass.newInstance();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             return null;
         }
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppender.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppender.java Tue Jul  9 06:08:25 2013
@@ -63,7 +63,7 @@ public final class RewriteAppender<T ext
             final String name = ref.getRef();
             final Appender appender = map.get(name);
             if (appender != null) {
-                Filter filter = appender instanceof AbstractAppender<?> ?
+                final Filter filter = appender instanceof AbstractAppender<?> ?
                     ((AbstractAppender<?>) appender).getFilter() : null;
                 appenders.put(name, new AppenderControl(appender, ref.getLevel(), filter));
             } else {

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/FastRollingFileManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/FastRollingFileManager.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/FastRollingFileManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/FastRollingFileManager.java Tue Jul  9 06:08:25 2013
@@ -39,7 +39,7 @@ public class FastRollingFileManager exte
     private final boolean isImmediateFlush;
     private RandomAccessFile randomAccessFile;
     private final ByteBuffer buffer;
-    private ThreadLocal<Boolean> isEndOfBatch = new ThreadLocal<Boolean>();
+    private final ThreadLocal<Boolean> isEndOfBatch = new ThreadLocal<Boolean>();
 
     public FastRollingFileManager(final RandomAccessFile raf, final String fileName,
             final String pattern, final OutputStream os, final boolean append,
@@ -66,12 +66,12 @@ public class FastRollingFileManager exte
         return isEndOfBatch.get();
     }
 
-    public void setEndOfBatch(boolean isEndOfBatch) {
+    public void setEndOfBatch(final boolean isEndOfBatch) {
         this.isEndOfBatch.set(Boolean.valueOf(isEndOfBatch));
     }
 
     @Override
-    protected synchronized void write(byte[] bytes, int offset, int length) {
+    protected synchronized void write(final byte[] bytes, int offset, int length) {
         super.write(bytes, offset, length); // writes to dummy output stream
 
         int chunk = 0;
@@ -103,8 +103,8 @@ public class FastRollingFileManager exte
         buffer.flip();
         try {
             randomAccessFile.write(buffer.array(), 0, buffer.limit());
-        } catch (IOException ex) {
-            String msg = "Error writing to RandomAccessFile " + getName();
+        } catch (final IOException ex) {
+            final String msg = "Error writing to RandomAccessFile " + getName();
             throw new AppenderRuntimeException(msg, ex);
         }
         buffer.clear();
@@ -134,8 +134,8 @@ public class FastRollingFileManager exte
          * @return a RollingFileManager.
          */
         @Override
-        public FastRollingFileManager createManager(String name, FactoryData data) {
-            File file = new File(name);
+        public FastRollingFileManager createManager(final String name, final FactoryData data) {
+            final File file = new File(name);
             final File parent = file.getParentFile();
             if (null != parent && !parent.exists()) {
                 parent.mkdirs();
@@ -157,7 +157,7 @@ public class FastRollingFileManager exte
                 }
                 return new FastRollingFileManager(raf, name, data.pattern, new DummyOutputStream(), data.append,
                         data.immediateFlush, size, time, data.policy, data.strategy, data.advertiseURI, data.layout);
-            } catch (IOException ex) {
+            } catch (final IOException ex) {
                 LOGGER.error("FastRollingFileManager (" + name + ") " + ex);
             }
             return null;
@@ -167,11 +167,11 @@ public class FastRollingFileManager exte
     /** {@code OutputStream} subclass that does not write anything. */
     static class DummyOutputStream extends OutputStream {
         @Override
-        public void write(int b) throws IOException {
+        public void write(final int b) throws IOException {
         }
 
         @Override
-        public void write(byte[] b, int off, int len) throws IOException {
+        public void write(final byte[] b, final int off, final int len) throws IOException {
         }
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/FileRenameAction.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/FileRenameAction.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/FileRenameAction.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/FileRenameAction.java Tue Jul  9 06:08:25 2013
@@ -105,7 +105,7 @@ public class FileRenameAction extends Ab
         } else {
             try {
                 source.delete();
-            } catch (Exception ex) {
+            } catch (final Exception ex) {
                 LOGGER.error("Unable to delete empty file " + source.getAbsolutePath());
             }
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLogger.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLogger.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLogger.java Tue Jul  9 06:08:25 2013
@@ -83,16 +83,16 @@ public class AsyncLogger extends Logger 
 
     private static ExecutorService executor = Executors
             .newSingleThreadExecutor(new DaemonThreadFactory("AsyncLogger-"));
-    private ThreadLocal<Info> threadlocalInfo = new ThreadLocal<Info>();
+    private final ThreadLocal<Info> threadlocalInfo = new ThreadLocal<Info>();
 
     static {
-        int ringBufferSize = calculateRingBufferSize();
+        final int ringBufferSize = calculateRingBufferSize();
 
-        WaitStrategy waitStrategy = createWaitStrategy();
+        final WaitStrategy waitStrategy = createWaitStrategy();
         disruptor = new Disruptor<RingBufferLogEvent>(
                 RingBufferLogEvent.FACTORY, ringBufferSize, executor,
                 ProducerType.MULTI, waitStrategy);
-        EventHandler<RingBufferLogEvent>[] handlers = new RingBufferLogEventHandler[] {//
+        final EventHandler<RingBufferLogEvent>[] handlers = new RingBufferLogEventHandler[] {//
         new RingBufferLogEventHandler() };
         disruptor.handleExceptionsWith(getExceptionHandler());
         disruptor.handleEventsWith(handlers);
@@ -105,7 +105,7 @@ public class AsyncLogger extends Logger 
 
     private static int calculateRingBufferSize() {
         int ringBufferSize = RINGBUFFER_DEFAULT_SIZE;
-        String userPreferredRBSize = System.getProperty(
+        final String userPreferredRBSize = System.getProperty(
                 "AsyncLogger.RingBufferSize", String.valueOf(ringBufferSize));
         try {
             int size = Integer.parseInt(userPreferredRBSize);
@@ -116,7 +116,7 @@ public class AsyncLogger extends Logger 
                         userPreferredRBSize, RINGBUFFER_MIN_SIZE);
             }
             ringBufferSize = size;
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             LOGGER.warn("Invalid RingBufferSize {}, using default size {}.",
                     userPreferredRBSize, ringBufferSize);
         }
@@ -124,7 +124,7 @@ public class AsyncLogger extends Logger 
     }
 
     private static WaitStrategy createWaitStrategy() {
-        String strategy = System.getProperty("AsyncLogger.WaitStrategy");
+        final String strategy = System.getProperty("AsyncLogger.WaitStrategy");
         LOGGER.debug("property AsyncLogger.WaitStrategy={}", strategy);
         if ("Sleep".equals(strategy)) {
             LOGGER.debug("disruptor event handler uses SleepingWaitStrategy");
@@ -141,19 +141,20 @@ public class AsyncLogger extends Logger 
     }
 
     private static ExceptionHandler getExceptionHandler() {
-        String cls = System.getProperty("AsyncLogger.ExceptionHandler");
+        final String cls = System.getProperty("AsyncLogger.ExceptionHandler");
         if (cls == null) {
             LOGGER.debug("No AsyncLogger.ExceptionHandler specified");
             return null;
         }
         try {
             @SuppressWarnings("unchecked")
+            final
             Class<? extends ExceptionHandler> klass = (Class<? extends ExceptionHandler>) Class
                     .forName(cls);
-            ExceptionHandler result = klass.newInstance();
+            final ExceptionHandler result = klass.newInstance();
             LOGGER.debug("AsyncLogger.ExceptionHandler=" + result);
             return result;
-        } catch (Exception ignored) {
+        } catch (final Exception ignored) {
             LOGGER.debug(
                     "AsyncLogger.ExceptionHandler not set: error creating "
                             + cls + ": ", ignored);
@@ -169,8 +170,8 @@ public class AsyncLogger extends Logger 
      * @param name name of this logger
      * @param messageFactory message factory of this logger
      */
-    public AsyncLogger(LoggerContext context, String name,
-            MessageFactory messageFactory) {
+    public AsyncLogger(final LoggerContext context, final String name,
+            final MessageFactory messageFactory) {
         super(context, name, messageFactory);
     }
 
@@ -183,8 +184,8 @@ public class AsyncLogger extends Logger 
     }
 
     @Override
-    public void log(Marker marker, String fqcn, Level level, Message data,
-            Throwable t) {
+    public void log(final Marker marker, final String fqcn, final Level level, final Message data,
+            final Throwable t) {
         Info info = threadlocalInfo.get();
         if (info == null) {
             info = new Info();
@@ -193,7 +194,7 @@ public class AsyncLogger extends Logger 
             threadlocalInfo.set(info);
         }
 
-        boolean includeLocation = config.loggerConfig.isIncludeLocation();
+        final boolean includeLocation = config.loggerConfig.isIncludeLocation();
         info.translator.setValues(this, getName(), marker, fqcn, level, data,
                 t, //
 
@@ -222,7 +223,7 @@ public class AsyncLogger extends Logger 
         disruptor.publishEvent(info.translator);
     }
 
-    private StackTraceElement location(String fqcnOfLogger) {
+    private StackTraceElement location(final String fqcnOfLogger) {
         return Log4jLogEvent.calcLocation(fqcnOfLogger);
     }
 
@@ -232,15 +233,15 @@ public class AsyncLogger extends Logger 
      * 
      * @param event the event to log
      */
-    public void actualAsyncLog(RingBufferLogEvent event) {
-        Map<Property, Boolean> properties = config.loggerConfig.getProperties();
+    public void actualAsyncLog(final RingBufferLogEvent event) {
+        final Map<Property, Boolean> properties = config.loggerConfig.getProperties();
         event.mergePropertiesIntoContextMap(properties,
                 config.config.getSubst());
         config.logEvent(event);
     }
 
     public static void stop() {
-        Disruptor<RingBufferLogEvent> temp = disruptor;
+        final Disruptor<RingBufferLogEvent> temp = disruptor;
 
         // Must guarantee that publishing to the RingBuffer has stopped
         // before we call disruptor.shutdown()
@@ -248,7 +249,7 @@ public class AsyncLogger extends Logger 
         temp.shutdown();
 
         // wait up to 10 seconds for the ringbuffer to drain
-        RingBuffer<RingBufferLogEvent> ringBuffer = temp.getRingBuffer();
+        final RingBuffer<RingBufferLogEvent> ringBuffer = temp.getRingBuffer();
         for (int i = 0; i < MAX_DRAIN_ATTEMPTS_BEFORE_SHUTDOWN; i++) {
             if (ringBuffer.hasAvailableCapacity(ringBuffer.getBufferSize())) {
                 break;
@@ -256,7 +257,7 @@ public class AsyncLogger extends Logger 
             try {
                 // give ringbuffer some time to drain...
                 Thread.sleep(HALF_A_SECOND);
-            } catch (InterruptedException e) {
+            } catch (final InterruptedException e) {
                 // ignored
             }
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfig.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfig.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfig.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfig.java Tue Jul  9 06:08:25 2013
@@ -102,7 +102,7 @@ public class AsyncLoggerConfig extends L
      * {@link #asyncCallAppenders(LogEvent)}.
      */
     @Override
-    protected void callAppenders(LogEvent event) {
+    protected void callAppenders(final LogEvent event) {
         // populate lazily initialized fields
         event.getSource();
         event.getThreadName();
@@ -112,7 +112,7 @@ public class AsyncLoggerConfig extends L
     }
 
     /** Called by AsyncLoggerConfigHelper.RingBufferLog4jEventHandler. */
-    void asyncCallAppenders(LogEvent event) {
+    void asyncCallAppenders(final LogEvent event) {
         super.callAppenders(event);
     }
 
@@ -183,7 +183,7 @@ public class AsyncLoggerConfig extends L
     }
 
     // Note: for asynchronous loggers, includeLocation default is FALSE
-    protected static boolean includeLocation(String includeLocationConfigValue) {
+    protected static boolean includeLocation(final String includeLocationConfigValue) {
         if (includeLocationConfigValue == null) {
             return false;
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfigHelper.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfigHelper.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfigHelper.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfigHelper.java Tue Jul  9 06:08:25 2013
@@ -85,16 +85,16 @@ class AsyncLoggerConfigHelper {
      */
     private final EventTranslator<Log4jEventWrapper> translator = new EventTranslator<Log4jEventWrapper>() {
         @Override
-        public void translateTo(Log4jEventWrapper event, long sequence) {
+        public void translateTo(final Log4jEventWrapper event, final long sequence) {
             event.event = currentLogEvent.get();
             event.loggerConfig = asyncLoggerConfig;
         }
     };
 
-    private ThreadLocal<LogEvent> currentLogEvent = new ThreadLocal<LogEvent>();
-    private AsyncLoggerConfig asyncLoggerConfig;
+    private final ThreadLocal<LogEvent> currentLogEvent = new ThreadLocal<LogEvent>();
+    private final AsyncLoggerConfig asyncLoggerConfig;
 
-    public AsyncLoggerConfigHelper(AsyncLoggerConfig asyncLoggerConfig) {
+    public AsyncLoggerConfigHelper(final AsyncLoggerConfig asyncLoggerConfig) {
         this.asyncLoggerConfig = asyncLoggerConfig;
         initDisruptor();
     }
@@ -104,11 +104,11 @@ class AsyncLoggerConfigHelper {
         if (disruptor != null) {
             return;
         }
-        int ringBufferSize = calculateRingBufferSize();
-        WaitStrategy waitStrategy = createWaitStrategy();
+        final int ringBufferSize = calculateRingBufferSize();
+        final WaitStrategy waitStrategy = createWaitStrategy();
         disruptor = new Disruptor<Log4jEventWrapper>(FACTORY, ringBufferSize,
                 executor, ProducerType.MULTI, waitStrategy);
-        EventHandler<Log4jEventWrapper>[] handlers = new Log4jEventWrapperHandler[] {//
+        final EventHandler<Log4jEventWrapper>[] handlers = new Log4jEventWrapperHandler[] {//
         new Log4jEventWrapperHandler() };
         disruptor.handleExceptionsWith(getExceptionHandler());
         disruptor.handleEventsWith(handlers);
@@ -120,7 +120,7 @@ class AsyncLoggerConfigHelper {
     }
 
     private static WaitStrategy createWaitStrategy() {
-        String strategy = System.getProperty("AsyncLoggerConfig.WaitStrategy");
+        final String strategy = System.getProperty("AsyncLoggerConfig.WaitStrategy");
         LOGGER.debug("property AsyncLoggerConfig.WaitStrategy={}", strategy);
         if ("Sleep".equals(strategy)) {
             LOGGER.debug("disruptor event handler uses SleepingWaitStrategy");
@@ -138,7 +138,7 @@ class AsyncLoggerConfigHelper {
 
     private static int calculateRingBufferSize() {
         int ringBufferSize = RINGBUFFER_DEFAULT_SIZE;
-        String userPreferredRBSize = System.getProperty(
+        final String userPreferredRBSize = System.getProperty(
                 "AsyncLoggerConfig.RingBufferSize",
                 String.valueOf(ringBufferSize));
         try {
@@ -150,7 +150,7 @@ class AsyncLoggerConfigHelper {
                         userPreferredRBSize, RINGBUFFER_MIN_SIZE);
             }
             ringBufferSize = size;
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             LOGGER.warn("Invalid RingBufferSize {}, using default size {}.",
                     userPreferredRBSize, ringBufferSize);
         }
@@ -158,19 +158,20 @@ class AsyncLoggerConfigHelper {
     }
 
     private static ExceptionHandler getExceptionHandler() {
-        String cls = System.getProperty("AsyncLoggerConfig.ExceptionHandler");
+        final String cls = System.getProperty("AsyncLoggerConfig.ExceptionHandler");
         if (cls == null) {
             LOGGER.debug("No AsyncLoggerConfig.ExceptionHandler specified");
             return null;
         }
         try {
             @SuppressWarnings("unchecked")
+            final
             Class<? extends ExceptionHandler> klass = (Class<? extends ExceptionHandler>) Class
                     .forName(cls);
-            ExceptionHandler result = klass.newInstance();
+            final ExceptionHandler result = klass.newInstance();
             LOGGER.debug("AsyncLoggerConfig.ExceptionHandler=" + result);
             return result;
-        } catch (Exception ignored) {
+        } catch (final Exception ignored) {
             LOGGER.debug(
                     "AsyncLoggerConfig.ExceptionHandler not set: error creating "
                             + cls + ": ", ignored);
@@ -197,13 +198,13 @@ class AsyncLoggerConfigHelper {
         private int counter;
 
         @Override
-        public void setSequenceCallback(Sequence sequenceCallback) {
+        public void setSequenceCallback(final Sequence sequenceCallback) {
             this.sequenceCallback = sequenceCallback;
         }
 
         @Override
-        public void onEvent(Log4jEventWrapper event, long sequence,
-                boolean endOfBatch) throws Exception {
+        public void onEvent(final Log4jEventWrapper event, final long sequence,
+                final boolean endOfBatch) throws Exception {
             event.event.setEndOfBatch(endOfBatch);
             event.loggerConfig.asyncCallAppenders(event.event);
 
@@ -221,7 +222,7 @@ class AsyncLoggerConfigHelper {
         if (--count > 0) {
             return;
         }
-        Disruptor<Log4jEventWrapper> temp = disruptor;
+        final Disruptor<Log4jEventWrapper> temp = disruptor;
         if (temp == null) {
             return; // disruptor was already shut down by another thread
         }
@@ -232,7 +233,7 @@ class AsyncLoggerConfigHelper {
         temp.shutdown();
 
         // wait up to 10 seconds for the ringbuffer to drain
-        RingBuffer<Log4jEventWrapper> ringBuffer = temp.getRingBuffer();
+        final RingBuffer<Log4jEventWrapper> ringBuffer = temp.getRingBuffer();
         for (int i = 0; i < MAX_DRAIN_ATTEMPTS_BEFORE_SHUTDOWN; i++) {
             if (ringBuffer.hasAvailableCapacity(ringBuffer.getBufferSize())) {
                 break;
@@ -240,14 +241,14 @@ class AsyncLoggerConfigHelper {
             try {
                 // give ringbuffer some time to drain...
                 Thread.sleep(HALF_A_SECOND);
-            } catch (InterruptedException e) {
+            } catch (final InterruptedException e) {
                 // ignored
             }
         }
         executor.shutdown(); // finally, kill the processor thread
     }
 
-    public void callAppendersFromAnotherThread(LogEvent event) {
+    public void callAppendersFromAnotherThread(final LogEvent event) {
         currentLogEvent.set(event);
         disruptor.publishEvent(translator);
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerContext.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerContext.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerContext.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerContext.java Tue Jul  9 06:08:25 2013
@@ -27,27 +27,27 @@ import org.apache.logging.log4j.message.
  */
 public class AsyncLoggerContext extends LoggerContext {
 
-    public AsyncLoggerContext(String name) {
+    public AsyncLoggerContext(final String name) {
         super(name);
     }
 
-    public AsyncLoggerContext(String name, Object externalContext) {
+    public AsyncLoggerContext(final String name, final Object externalContext) {
         super(name, externalContext);
     }
 
-    public AsyncLoggerContext(String name, Object externalContext,
-            URI configLocn) {
+    public AsyncLoggerContext(final String name, final Object externalContext,
+            final URI configLocn) {
         super(name, externalContext, configLocn);
     }
 
-    public AsyncLoggerContext(String name, Object externalContext,
-            String configLocn) {
+    public AsyncLoggerContext(final String name, final Object externalContext,
+            final String configLocn) {
         super(name, externalContext, configLocn);
     }
 
     @Override
-    protected Logger newInstance(LoggerContext ctx, String name,
-            MessageFactory messageFactory) {
+    protected Logger newInstance(final LoggerContext ctx, final String name,
+            final MessageFactory messageFactory) {
         return new AsyncLogger(ctx, name, messageFactory);
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerContextSelector.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerContextSelector.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerContextSelector.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerContextSelector.java Tue Jul  9 06:08:25 2013
@@ -32,24 +32,24 @@ public class AsyncLoggerContextSelector 
     private static final AsyncLoggerContext CONTEXT = new AsyncLoggerContext("AsyncLoggerContext");
 
     @Override
-    public LoggerContext getContext(String fqcn, ClassLoader loader, boolean currentContext) {
+    public LoggerContext getContext(final String fqcn, final ClassLoader loader, final boolean currentContext) {
         return CONTEXT;
     }
 
     @Override
     public List<LoggerContext> getLoggerContexts() {
-        List<LoggerContext> list = new ArrayList<LoggerContext>();
+        final List<LoggerContext> list = new ArrayList<LoggerContext>();
         list.add(CONTEXT);
         return Collections.unmodifiableList(list);
     }
 
     @Override
-    public LoggerContext getContext(String fqcn, ClassLoader loader, boolean currentContext, URI configLocation) {
+    public LoggerContext getContext(final String fqcn, final ClassLoader loader, final boolean currentContext, final URI configLocation) {
         return CONTEXT;
     }
 
     @Override
-    public void removeContext(LoggerContext context) {
+    public void removeContext(final LoggerContext context) {
     }
 
 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/DaemonThreadFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/DaemonThreadFactory.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/DaemonThreadFactory.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/DaemonThreadFactory.java Tue Jul  9 06:08:25 2013
@@ -28,15 +28,15 @@ public class DaemonThreadFactory impleme
     final AtomicInteger threadNumber = new AtomicInteger(1);
     final String threadNamePrefix;
 
-    public DaemonThreadFactory(String threadNamePrefix) {
+    public DaemonThreadFactory(final String threadNamePrefix) {
         this.threadNamePrefix = threadNamePrefix;
-        SecurityManager securityManager = System.getSecurityManager();
+        final SecurityManager securityManager = System.getSecurityManager();
         group = (securityManager != null) ? securityManager.getThreadGroup()
                 : Thread.currentThread().getThreadGroup();
     }
 
-    public Thread newThread(Runnable runnable) {
-        Thread thread = new Thread(group, runnable, threadNamePrefix
+    public Thread newThread(final Runnable runnable) {
+        final Thread thread = new Thread(group, runnable, threadNamePrefix
                 + threadNumber.getAndIncrement(), 0);
         if (!thread.isDaemon()) {
             thread.setDaemon(true);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEvent.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEvent.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEvent.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEvent.java Tue Jul  9 06:08:25 2013
@@ -66,11 +66,11 @@ public class RingBufferLogEvent implemen
     private boolean endOfBatch;
     private boolean includeLocation;
 
-    public void setValues(AsyncLogger asyncLogger, String loggerName,
-            Marker marker, String fqcn, Level level, Message data, Throwable t,
-            Map<String, String> map, ContextStack contextStack,
-            String threadName, StackTraceElement location,
-            long currentTimeMillis) {
+    public void setValues(final AsyncLogger asyncLogger, final String loggerName,
+            final Marker marker, final String fqcn, final Level level, final Message data, final Throwable t,
+            final Map<String, String> map, final ContextStack contextStack,
+            final String threadName, final StackTraceElement location,
+            final long currentTimeMillis) {
         this.asyncLogger = asyncLogger;
         this.loggerName = loggerName;
         this.marker = marker;
@@ -92,7 +92,7 @@ public class RingBufferLogEvent implemen
      * @param endOfBatch flag to indicate if this is the last event in a batch
      *            from the RingBuffer
      */
-    public void execute(boolean endOfBatch) {
+    public void execute(final boolean endOfBatch) {
         this.endOfBatch = endOfBatch;
         asyncLogger.actualAsyncLog(this);
     }
@@ -110,7 +110,7 @@ public class RingBufferLogEvent implemen
     }
 
     @Override
-    public void setEndOfBatch(boolean endOfBatch) {
+    public void setEndOfBatch(final boolean endOfBatch) {
         this.endOfBatch = endOfBatch;
     }
 
@@ -120,7 +120,7 @@ public class RingBufferLogEvent implemen
     }
 
     @Override
-    public void setIncludeLocation(boolean includeLocation) {
+    public void setIncludeLocation(final boolean includeLocation) {
         this.includeLocation = includeLocation;
     }
 
@@ -202,20 +202,20 @@ public class RingBufferLogEvent implemen
      * @param strSubstitutor used to lookup values of variables in properties
      */
     public void mergePropertiesIntoContextMap(
-            Map<Property, Boolean> properties, StrSubstitutor strSubstitutor) {
+            final Map<Property, Boolean> properties, final StrSubstitutor strSubstitutor) {
         if (properties == null) {
             return; // nothing to do
         }
 
-        Map<String, String> map = (contextMap == null) ? new HashMap<String, String>()
+        final Map<String, String> map = (contextMap == null) ? new HashMap<String, String>()
                 : new HashMap<String, String>(contextMap);
 
-        for (Map.Entry<Property, Boolean> entry : properties.entrySet()) {
-            Property prop = entry.getKey();
+        for (final Map.Entry<Property, Boolean> entry : properties.entrySet()) {
+            final Property prop = entry.getKey();
             if (map.containsKey(prop.getName())) {
                 continue; // contextMap overrides config properties
             }
-            String value = entry.getValue() ? strSubstitutor.replace(prop
+            final String value = entry.getValue() ? strSubstitutor.replace(prop
                     .getValue()) : prop.getValue();
             map.put(prop.getName(), value);
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventHandler.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventHandler.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventHandler.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventHandler.java Tue Jul  9 06:08:25 2013
@@ -33,13 +33,13 @@ public class RingBufferLogEventHandler i
     private int counter;
 
     @Override
-    public void setSequenceCallback(Sequence sequenceCallback) {
+    public void setSequenceCallback(final Sequence sequenceCallback) {
         this.sequenceCallback = sequenceCallback;
     }
 
     @Override
-    public void onEvent(RingBufferLogEvent event, long sequence,
-            boolean endOfBatch) throws Exception {
+    public void onEvent(final RingBufferLogEvent event, final long sequence,
+            final boolean endOfBatch) throws Exception {
         event.execute(endOfBatch);
         
         // notify the BatchEventProcessor that the sequence has progressed.

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventTranslator.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventTranslator.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventTranslator.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventTranslator.java Tue Jul  9 06:08:25 2013
@@ -49,17 +49,17 @@ public class RingBufferLogEventTranslato
 
     // @Override
     @Override
-    public void translateTo(RingBufferLogEvent event, long sequence) {
+    public void translateTo(final RingBufferLogEvent event, final long sequence) {
         event.setValues(asyncLogger, loggerName, marker, fqcn, level, message,
                 thrown, contextMap, contextStack, threadName, location,
                 currentTimeMillis);
     }
 
-    public void setValues(AsyncLogger asyncLogger, String loggerName,
-            Marker marker, String fqcn, Level level, Message message,
-            Throwable thrown, Map<String, String> contextMap,
-            ContextStack contextStack, String threadName,
-            StackTraceElement location, long currentTimeMillis) {
+    public void setValues(final AsyncLogger asyncLogger, final String loggerName,
+            final Marker marker, final String fqcn, final Level level, final Message message,
+            final Throwable thrown, final Map<String, String> contextMap,
+            final ContextStack contextStack, final String threadName,
+            final StackTraceElement location, final long currentTimeMillis) {
         this.asyncLogger = asyncLogger;
         this.loggerName = loggerName;
         this.marker = marker;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java Tue Jul  9 06:08:25 2013
@@ -154,11 +154,11 @@ public class BaseConfiguration extends A
     }
 
     protected Level getDefaultStatus() {
-        String statusLevel = PropertiesUtil.getProperties().getStringProperty(Constants.LOG4J_DEFAULT_STATUS_LEVEL,
+        final String statusLevel = PropertiesUtil.getProperties().getStringProperty(Constants.LOG4J_DEFAULT_STATUS_LEVEL,
             Level.ERROR.name());
         try {
             return Level.toLevel(statusLevel);
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             return Level.ERROR;
         }
     }
@@ -259,7 +259,7 @@ public class BaseConfiguration extends A
     protected PluginManager getPluginManager() {
         //don't cache a pluginmanager instance - packages may be updated, requiring
         // re-discovery of plugins
-        PluginManager mgr = new PluginManager("Core");
+        final PluginManager mgr = new PluginManager("Core");
         mgr.collectPlugins();
         return mgr;
     }
@@ -331,7 +331,7 @@ public class BaseConfiguration extends A
     }
 
     @Override
-    public void setConfigurationMonitor(ConfigurationMonitor monitor) {
+    public void setConfigurationMonitor(final ConfigurationMonitor monitor) {
         this.monitor = monitor;
     }
 
@@ -341,7 +341,7 @@ public class BaseConfiguration extends A
     }
 
     @Override
-    public void setAdvertiser(Advertiser advertiser) {
+    public void setAdvertiser(final Advertiser advertiser) {
         this.advertiser = advertiser;
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java Tue Jul  9 06:08:25 2013
@@ -100,7 +100,7 @@ public abstract class ConfigurationFacto
         if (factories == null) {
             synchronized(TEST_PREFIX) {
                 if (factories == null) {
-                    List<ConfigurationFactory> list = new ArrayList<ConfigurationFactory>();
+                    final List<ConfigurationFactory> list = new ArrayList<ConfigurationFactory>();
                     final String factoryClass = PropertiesUtil.getProperties().getStringProperty(CONFIGURATION_FACTORY_PROPERTY);
                     if (factoryClass != null) {
                         addFactory(list, factoryClass);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java Tue Jul  9 06:08:25 2013
@@ -61,7 +61,7 @@ public final class Configurator {
     public static LoggerContext initialize(final String name, final ClassLoader loader, final URI configLocation) {
 
         try {
-            org.apache.logging.log4j.spi.LoggerContext context = LogManager.getContext(loader, false, configLocation);
+            final org.apache.logging.log4j.spi.LoggerContext context = LogManager.getContext(loader, false, configLocation);
             if (context instanceof LoggerContext) {
                 final LoggerContext ctx = (LoggerContext) context;
                 final Configuration config = ConfigurationFactory.getInstance().getConfiguration(name, configLocation);
@@ -90,10 +90,10 @@ public final class Configurator {
             URI configLocation = null;
             try {
                 configLocation = source.getLocation() == null ? null : new URI(source.getLocation());
-            } catch (Exception ex) {
+            } catch (final Exception ex) {
                 // Invalid source location.
             }
-            org.apache.logging.log4j.spi.LoggerContext context = LogManager.getContext(loader, false, configLocation);
+            final org.apache.logging.log4j.spi.LoggerContext context = LogManager.getContext(loader, false, configLocation);
             if (context instanceof LoggerContext) {
                 final LoggerContext ctx = (LoggerContext) context;
                 final Configuration config = ConfigurationFactory.getInstance().getConfiguration(source);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/DefaultAdvertiser.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/DefaultAdvertiser.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/DefaultAdvertiser.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/DefaultAdvertiser.java Tue Jul  9 06:08:25 2013
@@ -32,7 +32,7 @@ public class DefaultAdvertiser implement
      * @return null
      */
     @Override
-    public Object advertise(Map<String, String> properties) {
+    public Object advertise(final Map<String, String> properties) {
         return null;
     }
 
@@ -41,7 +41,7 @@ public class DefaultAdvertiser implement
      * @param advertisedObject
      */
     @Override
-    public void unadvertise(Object advertisedObject) {
+    public void unadvertise(final Object advertisedObject) {
         //no-op
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java Tue Jul  9 06:08:25 2013
@@ -479,7 +479,7 @@ public class LoggerConfig extends Abstra
 
     // Note: for asynchronous loggers, includeLocation default is FALSE,
     // for synchronous loggers, includeLocation default is TRUE.
-    protected static boolean includeLocation(String includeLocationConfigValue) {
+    protected static boolean includeLocation(final String includeLocationConfigValue) {
         if (includeLocationConfigValue == null) {
             final boolean sync = !AsyncLoggerContextSelector.class.getName()
                     .equals(System.getProperty(Constants.LOG4J_CONTEXT_SELECTOR));

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java Tue Jul  9 06:08:25 2013
@@ -109,7 +109,7 @@ public class XMLConfiguration extends Ba
 
             for (final Map.Entry<String, String> entry : attrs.entrySet()) {
                 if ("status".equalsIgnoreCase(entry.getKey())) {
-                    Level stat = Level.toLevel(getSubst().replace(entry.getValue()), null);
+                    final Level stat = Level.toLevel(getSubst().replace(entry.getValue()), null);
                     if (stat != null) {
                         status = stat;
                     } else {
@@ -167,9 +167,9 @@ public class XMLConfiguration extends Ba
                                 {
                                     advertisedConfiguration.put("location", configSource.getLocation());
                                 }
-                            } catch (InstantiationException e) {
+                            } catch (final InstantiationException e) {
                                 System.err.println("InstantiationException attempting to instantiate advertiser: " + advertiserString);
-                            } catch (IllegalAccessException e) {
+                            } catch (final IllegalAccessException e) {
                                 System.err.println("IllegalAccessException attempting to instantiate advertiser: " + advertiserString);
                             }
                         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java Tue Jul  9 06:08:25 2013
@@ -240,7 +240,7 @@ public class PluginManager {
             } finally {
                 try {
                     dis.close();
-                } catch (Exception ignored) {
+                } catch (final Exception ignored) {
                     // nothing we can do here...
                 }
             }
@@ -275,7 +275,7 @@ public class PluginManager {
         } finally {
             try {
                 dos.close();
-            } catch (Exception ignored) {
+            } catch (final Exception ignored) {
                 // nothing we can do here...
             }
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Assert.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Assert.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Assert.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Assert.java Tue Jul  9 06:08:25 2013
@@ -50,7 +50,7 @@ public final class Assert {
      *            {@code null}
      * @return the specified parameter
      */
-    public static <T> T isNotNull(T checkMe, String name) {
+    public static <T> T isNotNull(final T checkMe, final String name) {
         if (checkMe == null) {
             throw new NullPointerException(name + " is null");
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CachedClock.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CachedClock.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CachedClock.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CachedClock.java Tue Jul  9 06:08:25 2013
@@ -35,7 +35,7 @@ public final class CachedClock implement
         @Override
         public void run() {
             while (true) {
-                long time = System.currentTimeMillis();
+                final long time = System.currentTimeMillis();
                 millis = time;
                 
                 // avoid explicit dependency on sun.misc.Util

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/ClockFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/ClockFactory.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/ClockFactory.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/ClockFactory.java Tue Jul  9 06:08:25 2013
@@ -59,7 +59,7 @@ public final class ClockFactory {
     }
 
     private static Clock createClock() {
-        String userRequest = System.getProperty(PROPERTY_NAME);
+        final String userRequest = System.getProperty(PROPERTY_NAME);
         if (userRequest == null || "SystemClock".equals(userRequest)) {
             LOGGER.debug("Using default SystemClock for timestamps");
             return new SystemClock();
@@ -75,11 +75,11 @@ public final class ClockFactory {
             return CoarseCachedClock.instance();
         }
         try {
-            Clock result = (Clock) Class.forName(userRequest).newInstance();
+            final Clock result = (Clock) Class.forName(userRequest).newInstance();
             LOGGER.debug("Using {} for timestamps", userRequest);
             return result;
-        } catch (Exception e) {
-            String fmt = "Could not create {}: {}, using default SystemClock for timestamps";
+        } catch (final Exception e) {
+            final String fmt = "Could not create {}: {}, using default SystemClock for timestamps";
             LOGGER.error(fmt, userRequest, e);
             return new SystemClock();
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CoarseCachedClock.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CoarseCachedClock.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CoarseCachedClock.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CoarseCachedClock.java Tue Jul  9 06:08:25 2013
@@ -30,7 +30,7 @@ public final class CoarseCachedClock imp
         @Override
         public void run() {
             while (true) {
-                long time = System.currentTimeMillis();
+                final long time = System.currentTimeMillis();
                 millis = time;
                 
                 // avoid explicit dependency on sun.misc.Util

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=1501104&r1=1501103&r2=1501104&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 Tue Jul  9 06:08:25 2013
@@ -57,7 +57,7 @@ public class Log4jContextFactory impleme
         }
         try {
             Server.registerMBeans(selector);
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             LOGGER.error("Could not start JMX", ex);
         }
     }
@@ -98,7 +98,7 @@ public class Log4jContextFactory impleme
      */
     @Override
     public LoggerContext getContext(final String fqcn, final ClassLoader loader, final boolean currentContext,
-            URI configLocation) {
+            final URI configLocation) {
         final LoggerContext ctx = selector.getContext(fqcn, loader, currentContext, configLocation);
         if (ctx.getStatus() == LoggerContext.Status.INITIALIZED) {
             ctx.start();
@@ -113,7 +113,7 @@ public class Log4jContextFactory impleme
      * @param context The context to remove.
      */
     @Override
-    public void removeContext(org.apache.logging.log4j.spi.LoggerContext context) {
+    public void removeContext(final org.apache.logging.log4j.spi.LoggerContext context) {
         if (context instanceof LoggerContext) {
             selector.removeContext((LoggerContext) context);
         }

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=1501104&r1=1501103&r2=1501104&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 Tue Jul  9 06:08:25 2013
@@ -248,7 +248,7 @@ public class Log4jLogEvent implements Lo
         return location;
     }
 
-    public static StackTraceElement calcLocation(String fqcnOfLogger) {
+    public static StackTraceElement calcLocation(final String fqcnOfLogger) {
         if (fqcnOfLogger == null) {
             return null;
         }
@@ -278,7 +278,7 @@ public class Log4jLogEvent implements Lo
     }
 
     @Override
-    public void setIncludeLocation(boolean includeLocation) {
+    public void setIncludeLocation(final boolean includeLocation) {
         this.includeLocation = includeLocation;
     }
 
@@ -288,7 +288,7 @@ public class Log4jLogEvent implements Lo
     }
 
     @Override
-    public void setEndOfBatch(boolean endOfBatch) {
+    public void setEndOfBatch(final boolean endOfBatch) {
         this.endOfBatch = endOfBatch;
     }
 
@@ -311,7 +311,7 @@ public class Log4jLogEvent implements Lo
         }
         if (event instanceof LogEventProxy) {
             final LogEventProxy proxy = (LogEventProxy) event;
-            Log4jLogEvent result = new Log4jLogEvent(proxy.name, proxy.marker,
+            final Log4jLogEvent result = new Log4jLogEvent(proxy.name, proxy.marker,
                     proxy.fqcnOfLogger, proxy.level, proxy.message,
                     proxy.throwable, proxy.mdc, proxy.ndc, proxy.threadName,
                     proxy.location, proxy.timestamp);
@@ -356,7 +356,7 @@ public class Log4jLogEvent implements Lo
         private final boolean isLocationRequired;
         private final boolean isEndOfBatch;
 
-        public LogEventProxy(final Log4jLogEvent event, boolean includeLocation) {
+        public LogEventProxy(final Log4jLogEvent event, final boolean includeLocation) {
             this.fqcnOfLogger = event.fqcnOfLogger;
             this.marker = event.marker;
             this.level = event.level;
@@ -377,7 +377,7 @@ public class Log4jLogEvent implements Lo
          * @return Log4jLogEvent.
          */
         protected Object readResolve() {
-            Log4jLogEvent result = new Log4jLogEvent(name, marker, fqcnOfLogger,
+            final Log4jLogEvent result = new Log4jLogEvent(name, marker, fqcnOfLogger,
                     level, message, throwable, mdc, ndc, threadName, location,
                     timestamp);
             result.setEndOfBatch(isEndOfBatch);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableFormatOptions.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableFormatOptions.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableFormatOptions.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableFormatOptions.java Tue Jul  9 06:08:25 2013
@@ -151,12 +151,12 @@ public final class ThrowableFormatOption
      */
     @Override
     public String toString() {
-        StringBuilder s = new StringBuilder();
+        final StringBuilder s = new StringBuilder();
         s.append("{").append(allLines() ? FULL : this.lines == 2 ? SHORT : anyLines() ? String.valueOf(this.lines) : NONE).append("}");
         s.append("{separator(").append(this.separator).append(")}");
         if (hasPackages()) {
             s.append("{filters(");
-            for (String p : this.packages) {
+            for (final String p : this.packages) {
                 s.append(p).append(",");
             }
             s.deleteCharAt(s.length() - 1);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/AppenderAdmin.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/AppenderAdmin.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/AppenderAdmin.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/AppenderAdmin.java Tue Jul  9 06:08:25 2013
@@ -37,16 +37,16 @@ public class AppenderAdmin implements Ap
      * @param contextName used in the {@code ObjectName} for this mbean
      * @param appender the instrumented object
      */
-    public AppenderAdmin(String contextName, Appender<?> appender) {
+    public AppenderAdmin(final String contextName, final Appender<?> appender) {
         // super(executor); // no notifications for now
         this.contextName = Assert.isNotNull(contextName, "contextName");
         this.appender = Assert.isNotNull(appender, "appender");
         try {
-            String ctxName = Server.escape(this.contextName);
-            String configName = Server.escape(appender.getName());
-            String name = String.format(PATTERN, ctxName, configName);
+            final String ctxName = Server.escape(this.contextName);
+            final String configName = Server.escape(appender.getName());
+            final String name = String.format(PATTERN, ctxName, configName);
             objectName = new ObjectName(name);
-        } catch (Exception e) {
+        } catch (final Exception e) {
             throw new IllegalStateException(e);
         }
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/ContextSelectorAdmin.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/ContextSelectorAdmin.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/ContextSelectorAdmin.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/ContextSelectorAdmin.java Tue Jul  9 06:08:25 2013
@@ -34,12 +34,12 @@ public class ContextSelectorAdmin implem
      * 
      * @param selector the instrumented object
      */
-    public ContextSelectorAdmin(ContextSelector selector) {
+    public ContextSelectorAdmin(final ContextSelector selector) {
         super();
         this.selector = Assert.isNotNull(selector, "ContextSelector");
         try {
             objectName = new ObjectName(NAME);
-        } catch (Exception e) {
+        } catch (final Exception e) {
             throw new IllegalStateException(e);
         }
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/LoggerConfigAdmin.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/LoggerConfigAdmin.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/LoggerConfigAdmin.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/LoggerConfigAdmin.java Tue Jul  9 06:08:25 2013
@@ -40,16 +40,16 @@ public class LoggerConfigAdmin implement
      * @param contextName used in the {@code ObjectName} for this mbean
      * @param loggerConfig the instrumented object
      */
-    public LoggerConfigAdmin(String contextName, LoggerConfig loggerConfig) {
+    public LoggerConfigAdmin(final String contextName, final LoggerConfig loggerConfig) {
         // super(executor); // no notifications for now
         this.contextName = Assert.isNotNull(contextName, "contextName");
         this.loggerConfig = Assert.isNotNull(loggerConfig, "loggerConfig");
         try {
-            String ctxName = Server.escape(this.contextName);
-            String configName = Server.escape(loggerConfig.getName());
-            String name = String.format(PATTERN, ctxName, configName);
+            final String ctxName = Server.escape(this.contextName);
+            final String configName = Server.escape(loggerConfig.getName());
+            final String name = String.format(PATTERN, ctxName, configName);
             objectName = new ObjectName(name);
-        } catch (Exception e) {
+        } catch (final Exception e) {
             throw new IllegalStateException(e);
         }
     }
@@ -75,7 +75,7 @@ public class LoggerConfigAdmin implement
     }
 
     @Override
-    public void setLevel(String level) {
+    public void setLevel(final String level) {
         loggerConfig.setLevel(Level.valueOf(level));
     }
 
@@ -85,7 +85,7 @@ public class LoggerConfigAdmin implement
     }
 
     @Override
-    public void setAdditive(boolean additive) {
+    public void setAdditive(final boolean additive) {
         loggerConfig.setAdditive(additive);
     }
 
@@ -101,8 +101,8 @@ public class LoggerConfigAdmin implement
 
     @Override
     public String[] getAppenderRefs() {
-        List<AppenderRef> refs = loggerConfig.getAppenderRefs();
-        String[] result = new String[refs.size()];
+        final List<AppenderRef> refs = loggerConfig.getAppenderRefs();
+        final String[] result = new String[refs.size()];
         for (int i = 0; i < result.length; i++) {
             result[i] = refs.get(i).getRef();
         }



Mime
View raw message