logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1501104 [1/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
Author: ggregory
Date: Tue Jul  9 06:08:25 2013
New Revision: 1501104

URL: http://svn.apache.org/r1501104
Log:
Add final modifier to private fields.
Add final modifier to method parameters.
Add final modifier to local variables.

Modified:
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/simple/SimpleLoggerContextFactory.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/DefaultThreadContextStack.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/MutableThreadContextStack.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
    logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/TestLoggerContext.java
    logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/TestLoggerContextFactory.java
    logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/ThreadContextTest.java
    logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/MessageFormatMessageTest.java
    logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/StringFormattedMessageTest.java
    logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/spi/DefaultThreadContextMapTest.java
    logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/spi/DefaultThreadContextStackTest.java
    logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/spi/MutableThreadContextStackTest.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Logger.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastFileAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastFileManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastRollingFileAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSQueueAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSTopicAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/OutputStreamManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SMTPAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SocketAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/AbstractLogEventWrapperEntity.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextMapJsonAttributeConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextStackAttributeConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextStackJsonAttributeConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/MarkerAttributeConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/StackTraceElementAttributeConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ThrowableAttributeConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/FastRollingFileManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/FileRenameAction.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLogger.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfig.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfigHelper.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerContext.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerContextSelector.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/DaemonThreadFactory.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEvent.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventHandler.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventTranslator.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/DefaultAdvertiser.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Assert.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CachedClock.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/ClockFactory.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CoarseCachedClock.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/Log4jContextFactory.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableFormatOptions.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/AppenderAdmin.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/ContextSelectorAdmin.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/LoggerConfigAdmin.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/LoggerContextAdmin.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/Server.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/StatusLoggerAdmin.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/LoggerFields.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/lookup/SystemPropertiesLookup.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/AbstractSocketManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/DatagramSocketManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/MulticastDNSAdvertiser.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/TCPSocketManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/UDPSocketServer.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/selector/BasicContextSelector.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/selector/JNDIContextSelector.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/web/Log4jServletContainerInitializer.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/web/Log4jServletContextListener.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/web/Log4jServletFilter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/web/Log4jWebInitializerImpl.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpMessage.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/LocationPerfCheck.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/Log4jInitPerformance.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LogEventFactoryTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerUpdateTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FastFileAppenderLocationTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FastFileAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FastFileManagerTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FastRollingFileAppenderLocationTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FastRollingFileAppenderRolloverTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FastRollingFileAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SocketAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/JdbcH2AppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/JdbcHyperSqlAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextMapAttributeConverterTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextMapJsonAttributeConverterTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextStackAttributeConverterTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextStackJsonAttributeConverterTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/MarkerAttributeConverterTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/MessageAttributeConverterTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/StackTraceElementAttributeConverterTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ThrowableAttributeConverterTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/MapRewritePolicyTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/rolling/FastRollingFileManagerTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/rolling/helper/FileRenameActionTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/AsyncLoggerConfigTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/AsyncLoggerContextSelectorTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/AsyncLoggerContextTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/AsyncLoggerLocationTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/AsyncLoggerTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/MTPerfTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/PerfTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/PerfTestDriver.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/PerfTestResultFormatter.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/RunLog4j1.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/RunLog4j2.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/RunLogback.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/AdvertiserTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/BaseConfigurationTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/InMemoryAdvertiser.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/RegexFilterTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/helpers/CachedClockTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/helpers/CharsetsTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/helpers/SystemClockTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/impl/Log4jLogEventTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/impl/ThrowableProxyTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/RFC5424LayoutTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/lookup/DateLookupTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/AbstractSocketServerTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/SocketReconnectTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/web/Log4jServletContainerInitializerTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/web/Log4jServletContextListenerTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/web/Log4jServletFilterTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/web/Log4jWebInitializerImplTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/layout/BasicLayout.java
    logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/BatchEvent.java
    logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java
    logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAvroManager.java
    logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEvent.java
    logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
    logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeAppenderTest.java
    logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedAgentTest.java
    logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedAppenderTest.java
    logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumePersistentAppenderTest.java
    logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumePersistentPerf.java
    logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContextFactory.java
    logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggingTest.java
    logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java
    logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/Log4jMarkerFactory.java

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java Tue Jul  9 06:08:25 2013
@@ -178,7 +178,7 @@ public class LogManager {
      * @return a LoggerContext.
      */
     public static LoggerContext getContext(final ClassLoader loader, final boolean currentContext,
-                                           URI configLocation) {
+                                           final URI configLocation) {
         return factory.getContext(LogManager.class.getName(), loader, currentContext, configLocation);
     }
 
@@ -360,7 +360,7 @@ public class LogManager {
      * @return The Logger.
      */
     public static Logger getLogger(final String name) {
-        String actualName = name != null ? name : getClassName(2);
+        final String actualName = name != null ? name : getClassName(2);
         return factory.getContext(LogManager.class.getName(), null, false).getLogger(actualName);
     }
 
@@ -373,7 +373,7 @@ public class LogManager {
      * @return The Logger.
      */
     public static Logger getLogger(final String name, final MessageFactory messageFactory) {
-        String actualName = name != null ? name : getClassName(2);
+        final String actualName = name != null ? name : getClassName(2);
         return factory.getContext(LogManager.class.getName(), null, false).getLogger(actualName, messageFactory);
     }
 
@@ -412,7 +412,7 @@ public class LogManager {
      * @param depth a 0-based index in the current stack.
      * @return a class name
      */
-    private static String getClassName(int depth) {
+    private static String getClassName(final int depth) {
         return new Throwable().getStackTrace()[depth].getClassName();
     }
 }

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java Tue Jul  9 06:08:25 2013
@@ -197,8 +197,8 @@ public class StructuredDataMessage exten
         if (key.length() > MAX_LENGTH) {
             throw new IllegalArgumentException("Structured data keys are limited to 32 characters. key: " + key);
         }
-        char[] chars = key.toCharArray();
-        for (char c : chars) {
+        final char[] chars = key.toCharArray();
+        for (final char c : chars) {
             if (c < '!' || c > '~' || c == '=' || c == ']' || c == '"') {
                 throw new IllegalArgumentException("Structured data keys must contain printable US ASCII characters" +
                         "and may not contain a space, =, ], or \"");

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/simple/SimpleLoggerContextFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/simple/SimpleLoggerContextFactory.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/simple/SimpleLoggerContextFactory.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/simple/SimpleLoggerContextFactory.java Tue Jul  9 06:08:25 2013
@@ -35,11 +35,11 @@ public class SimpleLoggerContextFactory 
 
     @Override
     public LoggerContext getContext(final String fqcn, final ClassLoader loader, final boolean currentContext,
-                                    URI configLocation) {
+                                    final URI configLocation) {
         return context;
     }
 
     @Override
-    public void removeContext(LoggerContext context) {
+    public void removeContext(final LoggerContext context) {
     }
 }

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java Tue Jul  9 06:08:25 2013
@@ -164,7 +164,7 @@ public abstract class AbstractLogger imp
      * @param level The logging level.
      * @param t The Throwable.
      */
-    protected void catching(String fqcn, final Level level, final Throwable t) {
+    protected void catching(final String fqcn, final Level level, final Throwable t) {
         if (isEnabled(level, CATCHING_MARKER, (Object) null, null)) {
             log(CATCHING_MARKER, fqcn, level, messageFactory.newMessage(CATCHING), t);
         }
@@ -1493,7 +1493,7 @@ public abstract class AbstractLogger imp
      * @param t The Throwable.
      * @return the Throwable.
      */
-    protected <T extends Throwable> T throwing(String fqcn, final Level level, final T t) {
+    protected <T extends Throwable> T throwing(final String fqcn, final Level level, final T t) {
         if (isEnabled(level, THROWING_MARKER, (Object) null, null)) {
             log(THROWING_MARKER, fqcn, level, messageFactory.newMessage(THROWING), t);
         }

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/DefaultThreadContextStack.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/DefaultThreadContextStack.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/DefaultThreadContextStack.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/DefaultThreadContextStack.java Tue Jul  9 06:08:25 2013
@@ -37,7 +37,7 @@ public class DefaultThreadContextStack i
 
     private final boolean useStack;
 
-    public DefaultThreadContextStack(boolean useStack) {
+    public DefaultThreadContextStack(final boolean useStack) {
         this.useStack = useStack;
     }
 
@@ -95,7 +95,7 @@ public class DefaultThreadContextStack i
             return;
         }
         final List<String> copy = new ArrayList<String>();
-        int count = Math.min(depth, list.size());
+        final int count = Math.min(depth, list.size());
         for (int i = 0; i < count; i++) {
             copy.add(list.get(i));
         }
@@ -124,7 +124,7 @@ public class DefaultThreadContextStack i
         return result == null || result.isEmpty();
     }
 
-    public boolean contains(Object o) {
+    public boolean contains(final Object o) {
         final List<String> result = stack.get();
         return result != null && result.contains(o);
     }
@@ -146,8 +146,8 @@ public class DefaultThreadContextStack i
         return result.toArray(new Object[result.size()]);
     }
 
-    public <T> T[] toArray(T[] ts) {
-        List<String> result = stack.get();
+    public <T> T[] toArray(final T[] ts) {
+        final List<String> result = stack.get();
         if (result == null) {
             if (ts.length > 0) { // as per the contract of j.u.List#toArray(T[])
                 ts[0] = null;
@@ -157,7 +157,7 @@ public class DefaultThreadContextStack i
         return result.toArray(ts);
     }
 
-    public boolean add(String s) {
+    public boolean add(final String s) {
         if (!useStack) {
             return false;
         }
@@ -169,7 +169,7 @@ public class DefaultThreadContextStack i
         return true;
     }
 
-    public boolean remove(Object o) {
+    public boolean remove(final Object o) {
         if (!useStack) {
             return false;
         }
@@ -183,7 +183,7 @@ public class DefaultThreadContextStack i
         return result;
     }
 
-    public boolean containsAll(Collection<?> objects) {
+    public boolean containsAll(final Collection<?> objects) {
         if (objects.isEmpty()) { // quick check before accessing the ThreadLocal
             return true; // looks counter-intuitive, but see
                          // j.u.AbstractCollection
@@ -192,7 +192,7 @@ public class DefaultThreadContextStack i
         return list != null && list.containsAll(objects);
     }
 
-    public boolean addAll(Collection<? extends String> strings) {
+    public boolean addAll(final Collection<? extends String> strings) {
         if (!useStack || strings.isEmpty()) {
             return false;
         }
@@ -204,7 +204,7 @@ public class DefaultThreadContextStack i
         return true;
     }
 
-    public boolean removeAll(Collection<?> objects) {
+    public boolean removeAll(final Collection<?> objects) {
         if (!useStack || objects.isEmpty()) {
             return false;
         }
@@ -213,12 +213,12 @@ public class DefaultThreadContextStack i
             return false;
         }
         final List<String> copy = new ArrayList<String>(list);
-        boolean result = copy.removeAll(objects);
+        final boolean result = copy.removeAll(objects);
         stack.set(Collections.unmodifiableList(copy));
         return result;
     }
 
-    public boolean retainAll(Collection<?> objects) {
+    public boolean retainAll(final Collection<?> objects) {
         if (!useStack || objects.isEmpty()) {
             return false;
         }

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/MutableThreadContextStack.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/MutableThreadContextStack.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/MutableThreadContextStack.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/MutableThreadContextStack.java Tue Jul  9 06:08:25 2013
@@ -33,11 +33,11 @@ public class MutableThreadContextStack i
      */
     private final List<String> list;
 
-    public MutableThreadContextStack(List<String> list) {
+    public MutableThreadContextStack(final List<String> list) {
         this.list = new ArrayList<String>(list);
     }
 
-    private MutableThreadContextStack(MutableThreadContextStack stack) {
+    private MutableThreadContextStack(final MutableThreadContextStack stack) {
         this.list = new ArrayList<String>(stack.list);
     }
 
@@ -78,7 +78,7 @@ public class MutableThreadContextStack i
             return;
         }
         final List<String> copy = new ArrayList<String>(list.size());
-        int count = Math.min(depth, list.size());
+        final int count = Math.min(depth, list.size());
         for (int i = 0; i < count; i++) {
             copy.add(list.get(i));
         }
@@ -102,7 +102,7 @@ public class MutableThreadContextStack i
         return list.isEmpty();
     }
 
-    public boolean contains(Object o) {
+    public boolean contains(final Object o) {
         return list.contains(o);
     }
 
@@ -114,31 +114,31 @@ public class MutableThreadContextStack i
         return list.toArray();
     }
 
-    public <T> T[] toArray(T[] ts) {
+    public <T> T[] toArray(final T[] ts) {
         return list.toArray(ts);
     }
 
-    public boolean add(String s) {
+    public boolean add(final String s) {
         return list.add(s);
     }
 
-    public boolean remove(Object o) {
+    public boolean remove(final Object o) {
         return list.remove(o);
     }
 
-    public boolean containsAll(Collection<?> objects) {
+    public boolean containsAll(final Collection<?> objects) {
         return list.containsAll(objects);
     }
 
-    public boolean addAll(Collection<? extends String> strings) {
+    public boolean addAll(final Collection<? extends String> strings) {
         return list.addAll(strings);
     }
 
-    public boolean removeAll(Collection<?> objects) {
+    public boolean removeAll(final Collection<?> objects) {
         return list.removeAll(objects);
     }
 
-    public boolean retainAll(Collection<?> objects) {
+    public boolean retainAll(final Collection<?> objects) {
         return list.retainAll(objects);
     }
 }

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java Tue Jul  9 06:08:25 2013
@@ -82,7 +82,7 @@ public class PropertiesUtil {
         if (prop != null) {
             try {
                 return Integer.parseInt(prop);
-            } catch (Exception ex) {
+            } catch (final Exception ex) {
                 return defaultValue;
             }
         }
@@ -103,7 +103,7 @@ public class PropertiesUtil {
         if (prop != null) {
             try {
                 return Long.parseLong(prop);
-            } catch (Exception ex) {
+            } catch (final Exception ex) {
                 return defaultValue;
             }
         }

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/TestLoggerContext.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/TestLoggerContext.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/TestLoggerContext.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/TestLoggerContext.java Tue Jul  9 06:08:25 2013
@@ -26,14 +26,14 @@ import java.util.Map;
  *
  */
 public class TestLoggerContext implements LoggerContext {
-    private Map<String, Logger> map = new HashMap<String, Logger>();
+    private final Map<String, Logger> map = new HashMap<String, Logger>();
 
     @Override
     public Logger getLogger(final String name) {
         if (map.containsKey(name)) {
             return map.get(name);
         }
-        Logger logger = new TestLogger(name);
+        final Logger logger = new TestLogger(name);
         map.put(name, logger);
         return logger;
     }

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/TestLoggerContextFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/TestLoggerContextFactory.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/TestLoggerContextFactory.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/TestLoggerContextFactory.java Tue Jul  9 06:08:25 2013
@@ -35,11 +35,11 @@ public class TestLoggerContextFactory im
 
     @Override
     public LoggerContext getContext(final String fqcn, final ClassLoader loader, final boolean currentContext,
-                                    URI configLocation) {
+                                    final URI configLocation) {
         return context;
     }
 
     @Override
-    public void removeContext(LoggerContext context) {
+    public void removeContext(final LoggerContext context) {
     }
 }

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/ThreadContextTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/ThreadContextTest.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/ThreadContextTest.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/ThreadContextTest.java Tue Jul  9 06:08:25 2013
@@ -61,7 +61,7 @@ public class ThreadContextTest {
     @Test
     public void perfTest() throws Exception {
         ThreadContext.clear();
-        Timer complete = new Timer("ThreadContextTest");
+        final Timer complete = new Timer("ThreadContextTest");
         complete.start();
         ThreadContext.put("Var1", "value 1");
         ThreadContext.put("Var2", "value 2");
@@ -74,10 +74,10 @@ public class ThreadContextTest {
         ThreadContext.put("Var9", "value 9");
         ThreadContext.put("Var10", "value 10");
         final int loopCount = 1000000;
-        Timer timer = new Timer("ThreadContextCopy", loopCount);
+        final Timer timer = new Timer("ThreadContextCopy", loopCount);
         timer.start();
         for (int i = 0; i < loopCount; ++i) {
-            Map<String, String> map = ThreadContext.getImmutableContext();
+            final Map<String, String> map = ThreadContext.getImmutableContext();
             assertNotNull(map);
         }
         timer.stop();
@@ -95,7 +95,7 @@ public class ThreadContextTest {
     @Test
     public void testGetContextReturnsMutableCopy() {
         ThreadContext.clear();
-        Map<String, String> map1 = ThreadContext.getContext();
+        final Map<String, String> map1 = ThreadContext.getContext();
         assertTrue(map1.isEmpty());
         map1.put("K", "val"); // no error
         assertEquals("val", map1.get("K"));
@@ -104,7 +104,7 @@ public class ThreadContextTest {
         assertTrue(ThreadContext.getContext().isEmpty());
 
         ThreadContext.put("key", "val2");
-        Map<String, String> map2 = ThreadContext.getContext();
+        final Map<String, String> map2 = ThreadContext.getContext();
         assertEquals(1, map2.size());
         assertEquals("val2", map2.get("key"));
         map2.put("K", "val"); // no error
@@ -125,14 +125,14 @@ public class ThreadContextTest {
     public void testGetImmutableContextReturnsImmutableMapIfNonEmpty() {
         ThreadContext.clear();
         ThreadContext.put("key", "val");
-        Map<String, String> immutable = ThreadContext.getImmutableContext();
+        final Map<String, String> immutable = ThreadContext.getImmutableContext();
         immutable.put("otherkey", "otherval");
     }
 
     @Test(expected = UnsupportedOperationException.class)
     public void testGetImmutableContextReturnsImmutableMapIfEmpty() {
         ThreadContext.clear();
-        Map<String, String> immutable = ThreadContext.getImmutableContext();
+        final Map<String, String> immutable = ThreadContext.getImmutableContext();
         immutable.put("otherkey", "otherval");
     }
 

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/MessageFormatMessageTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/MessageFormatMessageTest.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/MessageFormatMessageTest.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/MessageFormatMessageTest.java Tue Jul  9 06:08:25 2013
@@ -59,7 +59,7 @@ public class MessageFormatMessageTest {
         final String result = msg.getFormattedMessage();
         final String expected = "Test message Apache";
         assertEquals(expected, result);
-        Throwable t = msg.getThrowable();
+        final Throwable t = msg.getThrowable();
         assertNotNull("No Throwable", t);
     }
 }

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/StringFormattedMessageTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/StringFormattedMessageTest.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/StringFormattedMessageTest.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/StringFormattedMessageTest.java Tue Jul  9 06:08:25 2013
@@ -58,7 +58,7 @@ public class StringFormattedMessageTest 
         final String result = msg.getFormattedMessage();
         final String expected = "Test message Apache";
         assertEquals(expected, result);
-        Throwable t = msg.getThrowable();
+        final Throwable t = msg.getThrowable();
         assertNotNull("No Throwable", t);
     }
 }

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/spi/DefaultThreadContextMapTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/spi/DefaultThreadContextMapTest.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/spi/DefaultThreadContextMapTest.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/spi/DefaultThreadContextMapTest.java Tue Jul  9 06:08:25 2013
@@ -29,7 +29,7 @@ public class DefaultThreadContextMapTest
 
     @Test
     public void testDoesNothingIfConstructedWithUseMapIsFalse() {
-        DefaultThreadContextMap map = new DefaultThreadContextMap(false);
+        final DefaultThreadContextMap map = new DefaultThreadContextMap(false);
         assertTrue(map.isEmpty());
         assertFalse(map.containsKey("key"));
         map.put("key", "value");
@@ -41,7 +41,7 @@ public class DefaultThreadContextMapTest
 
     @Test
     public void testPut() {
-        DefaultThreadContextMap map = new DefaultThreadContextMap(true);
+        final DefaultThreadContextMap map = new DefaultThreadContextMap(true);
         assertTrue(map.isEmpty());
         assertFalse(map.containsKey("key"));
         map.put("key", "value");
@@ -58,7 +58,7 @@ public class DefaultThreadContextMapTest
      */
     @Test
     public void testRemove() {
-        DefaultThreadContextMap map = new DefaultThreadContextMap(true);
+        final DefaultThreadContextMap map = new DefaultThreadContextMap(true);
         assertTrue(map.isEmpty());
         map.put("key", "value");
         map.put("key2", "value2");
@@ -72,7 +72,7 @@ public class DefaultThreadContextMapTest
 
     @Test
     public void testClear() {
-        DefaultThreadContextMap map = new DefaultThreadContextMap(true);
+        final DefaultThreadContextMap map = new DefaultThreadContextMap(true);
         assertTrue(map.isEmpty());
         map.put("key", "value");
         map.put("key2", "value2");
@@ -87,9 +87,9 @@ public class DefaultThreadContextMapTest
 
     @Test
     public void testGetCopyReturnsMutableMap() {
-        DefaultThreadContextMap map = new DefaultThreadContextMap(true);
+        final DefaultThreadContextMap map = new DefaultThreadContextMap(true);
         assertTrue(map.isEmpty());
-        Map<String, String> copy = map.getCopy();
+        final Map<String, String> copy = map.getCopy();
         assertTrue(copy.isEmpty());
 
         copy.put("key", "value"); // mutable
@@ -101,10 +101,10 @@ public class DefaultThreadContextMapTest
 
     @Test
     public void testGetCopyReturnsMutableCopy() {
-        DefaultThreadContextMap map = new DefaultThreadContextMap(true);
+        final DefaultThreadContextMap map = new DefaultThreadContextMap(true);
         map.put("key1", "value1");
         assertFalse(map.isEmpty());
-        Map<String, String> copy = map.getCopy();
+        final Map<String, String> copy = map.getCopy();
         assertEquals("value1", copy.get("key1")); // copy has values too
 
         copy.put("key", "value"); // copy is mutable
@@ -122,18 +122,18 @@ public class DefaultThreadContextMapTest
 
     @Test
     public void testGetImmutableMapReturnsNullIfEmpty() {
-        DefaultThreadContextMap map = new DefaultThreadContextMap(true);
+        final DefaultThreadContextMap map = new DefaultThreadContextMap(true);
         assertTrue(map.isEmpty());
         assertNull(map.getImmutableMapOrNull());
     }
 
     @Test(expected = UnsupportedOperationException.class)
     public void testGetImmutableMapReturnsImmutableMapIfNonEmpty() {
-        DefaultThreadContextMap map = new DefaultThreadContextMap(true);
+        final DefaultThreadContextMap map = new DefaultThreadContextMap(true);
         map.put("key1", "value1");
         assertFalse(map.isEmpty());
 
-        Map<String, String> immutable = map.getImmutableMapOrNull();
+        final Map<String, String> immutable = map.getImmutableMapOrNull();
         assertEquals("value1", immutable.get("key1")); // copy has values too
 
         // immutable
@@ -142,11 +142,11 @@ public class DefaultThreadContextMapTest
 
     @Test
     public void testGetImmutableMapCopyNotAffectdByContextMapChanges() {
-        DefaultThreadContextMap map = new DefaultThreadContextMap(true);
+        final DefaultThreadContextMap map = new DefaultThreadContextMap(true);
         map.put("key1", "value1");
         assertFalse(map.isEmpty());
 
-        Map<String, String> immutable = map.getImmutableMapOrNull();
+        final Map<String, String> immutable = map.getImmutableMapOrNull();
         assertEquals("value1", immutable.get("key1")); // copy has values too
 
         // clearing context map does not affect copy

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/spi/DefaultThreadContextStackTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/spi/DefaultThreadContextStackTest.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/spi/DefaultThreadContextStackTest.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/spi/DefaultThreadContextStackTest.java Tue Jul  9 06:08:25 2013
@@ -27,7 +27,7 @@ public class DefaultThreadContextStackTe
 
     @Test
     public void testDoesNothingIfConstructedWithUseStackIsFalse() {
-        DefaultThreadContextStack stack = new DefaultThreadContextStack(false);
+        final DefaultThreadContextStack stack = new DefaultThreadContextStack(false);
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg");
@@ -39,7 +39,7 @@ public class DefaultThreadContextStackTe
 
     @Test
     public void testPushAndAddIncreaseStack() {
-        DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
+        final DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -50,7 +50,7 @@ public class DefaultThreadContextStackTe
 
     @Test
     public void testPeekReturnsLastAddedItem() {
-        DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
+        final DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -65,7 +65,7 @@ public class DefaultThreadContextStackTe
 
     @Test
     public void testPopRemovesLastAddedItem() {
-        DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
+        final DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -89,7 +89,7 @@ public class DefaultThreadContextStackTe
 
     @Test
     public void testAsList() {
-        DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
+        final DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -101,7 +101,7 @@ public class DefaultThreadContextStackTe
 
     @Test
     public void testTrim() {
-        DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
+        final DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -116,7 +116,7 @@ public class DefaultThreadContextStackTe
 
     @Test
     public void testCopy() {
-        DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
+        final DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -124,7 +124,7 @@ public class DefaultThreadContextStackTe
         stack.push("msg3");
         assertEquals(3, stack.size());
         
-        ThreadContextStack copy = stack.copy();
+        final ThreadContextStack copy = stack.copy();
         assertEquals(3, copy.size());
         assertTrue(copy.containsAll(Arrays.asList("msg1", "msg2", "msg3")));
 
@@ -152,7 +152,7 @@ public class DefaultThreadContextStackTe
 
     @Test
     public void testClear() {
-        DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
+        final DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -166,7 +166,7 @@ public class DefaultThreadContextStackTe
 
     @Test
     public void testContains() {
-        DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
+        final DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -181,7 +181,7 @@ public class DefaultThreadContextStackTe
 
     @Test
     public void testIteratorReturnsInListOrderNotStackOrder() {
-        DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
+        final DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -189,7 +189,7 @@ public class DefaultThreadContextStackTe
         stack.push("msg3");
         assertEquals(3, stack.size());
         
-        Iterator<String> iter = stack.iterator();
+        final Iterator<String> iter = stack.iterator();
         assertTrue(iter.hasNext());
         assertEquals("msg1", iter.next());
         assertTrue(iter.hasNext());
@@ -201,7 +201,7 @@ public class DefaultThreadContextStackTe
 
     @Test
     public void testToArray() {
-        DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
+        final DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -209,13 +209,13 @@ public class DefaultThreadContextStackTe
         stack.push("msg3");
         assertEquals(3, stack.size());
         
-        String[] expecteds = {"msg1", "msg2", "msg3"};
+        final String[] expecteds = {"msg1", "msg2", "msg3"};
         assertArrayEquals(expecteds, stack.toArray());
     }
 
     @Test
     public void testToArrayTArray() {
-        DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
+        final DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -223,15 +223,15 @@ public class DefaultThreadContextStackTe
         stack.push("msg3");
         assertEquals(3, stack.size());
         
-        String[] expecteds = {"msg1", "msg2", "msg3"};
-        String[] result = new String[3] ;
+        final String[] expecteds = {"msg1", "msg2", "msg3"};
+        final String[] result = new String[3] ;
         assertArrayEquals(expecteds, stack.toArray(result));
         assertSame(result, stack.toArray(result));
     }
 
     @Test
     public void testRemove() {
-        DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
+        final DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -253,7 +253,7 @@ public class DefaultThreadContextStackTe
 
     @Test
     public void testContainsAll() {
-        DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
+        final DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -266,7 +266,7 @@ public class DefaultThreadContextStackTe
 
     @Test
     public void testAddAll() {
-        DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
+        final DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -285,7 +285,7 @@ public class DefaultThreadContextStackTe
 
     @Test
     public void testRemoveAll() {
-        DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
+        final DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -302,7 +302,7 @@ public class DefaultThreadContextStackTe
 
     @Test
     public void testRetainAll() {
-        DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
+        final DefaultThreadContextStack stack = new DefaultThreadContextStack(true);
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/spi/MutableThreadContextStackTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/spi/MutableThreadContextStackTest.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/spi/MutableThreadContextStackTest.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/spi/MutableThreadContextStackTest.java Tue Jul  9 06:08:25 2013
@@ -29,21 +29,21 @@ public class MutableThreadContextStackTe
 
     @Test
     public void testEmptyIfConstructedWithEmptyList() {
-        MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
+        final MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
         assertTrue(stack.isEmpty());
     }
 
     @Test
     public void testConstructorCopiesListContents() {
-        List<String> initial = Arrays.asList("a", "b", "c");
-        MutableThreadContextStack stack = new MutableThreadContextStack(initial);
+        final List<String> initial = Arrays.asList("a", "b", "c");
+        final MutableThreadContextStack stack = new MutableThreadContextStack(initial);
         assertFalse(stack.isEmpty());
         assertTrue(stack.containsAll(initial));
     }
 
     @Test
     public void testPushAndAddIncreaseStack() {
-        MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
+        final MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -54,7 +54,7 @@ public class MutableThreadContextStackTe
 
     @Test
     public void testPeekReturnsLastAddedItem() {
-        MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
+        final MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -69,7 +69,7 @@ public class MutableThreadContextStackTe
 
     @Test
     public void testPopRemovesLastAddedItem() {
-        MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
+        final MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -93,7 +93,7 @@ public class MutableThreadContextStackTe
 
     @Test
     public void testAsList() {
-        MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
+        final MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -105,7 +105,7 @@ public class MutableThreadContextStackTe
 
     @Test
     public void testTrim() {
-        MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
+        final MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -120,7 +120,7 @@ public class MutableThreadContextStackTe
 
     @Test
     public void testCopy() {
-        MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
+        final MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -128,7 +128,7 @@ public class MutableThreadContextStackTe
         stack.push("msg3");
         assertEquals(3, stack.size());
         
-        ThreadContextStack copy = stack.copy();
+        final ThreadContextStack copy = stack.copy();
         assertEquals(3, copy.size());
         assertTrue(copy.containsAll(Arrays.asList("msg1", "msg2", "msg3")));
 
@@ -156,7 +156,7 @@ public class MutableThreadContextStackTe
 
     @Test
     public void testClear() {
-        MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
+        final MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -170,7 +170,7 @@ public class MutableThreadContextStackTe
 
     @Test
     public void testContains() {
-        MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
+        final MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -185,7 +185,7 @@ public class MutableThreadContextStackTe
 
     @Test
     public void testIteratorReturnsInListOrderNotStackOrder() {
-        MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
+        final MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -193,7 +193,7 @@ public class MutableThreadContextStackTe
         stack.push("msg3");
         assertEquals(3, stack.size());
         
-        Iterator<String> iter = stack.iterator();
+        final Iterator<String> iter = stack.iterator();
         assertTrue(iter.hasNext());
         assertEquals("msg1", iter.next());
         assertTrue(iter.hasNext());
@@ -205,7 +205,7 @@ public class MutableThreadContextStackTe
 
     @Test
     public void testToArray() {
-        MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
+        final MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -213,13 +213,13 @@ public class MutableThreadContextStackTe
         stack.push("msg3");
         assertEquals(3, stack.size());
         
-        String[] expecteds = {"msg1", "msg2", "msg3"};
+        final String[] expecteds = {"msg1", "msg2", "msg3"};
         assertArrayEquals(expecteds, stack.toArray());
     }
 
     @Test
     public void testToArrayTArray() {
-        MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
+        final MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -227,15 +227,15 @@ public class MutableThreadContextStackTe
         stack.push("msg3");
         assertEquals(3, stack.size());
         
-        String[] expecteds = {"msg1", "msg2", "msg3"};
-        String[] result = new String[3] ;
+        final String[] expecteds = {"msg1", "msg2", "msg3"};
+        final String[] result = new String[3] ;
         assertArrayEquals(expecteds, stack.toArray(result));
         assertSame(result, stack.toArray(result));
     }
 
     @Test
     public void testRemove() {
-        MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
+        final MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -257,7 +257,7 @@ public class MutableThreadContextStackTe
 
     @Test
     public void testContainsAll() {
-        MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
+        final MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -270,7 +270,7 @@ public class MutableThreadContextStackTe
 
     @Test
     public void testAddAll() {
-        MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
+        final MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -289,7 +289,7 @@ public class MutableThreadContextStackTe
 
     @Test
     public void testRemoveAll() {
-        MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
+        final MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");
@@ -306,7 +306,7 @@ public class MutableThreadContextStackTe
 
     @Test
     public void testRetainAll() {
-        MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
+        final MutableThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>());
         stack.clear();
         assertTrue(stack.isEmpty());
         stack.push("msg1");

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Logger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Logger.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Logger.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Logger.java Tue Jul  9 06:08:25 2013
@@ -64,7 +64,7 @@ public class Logger extends AbstractLogg
      * @return The parent Logger.
      */
     public Logger getParent() {
-        LoggerConfig lc = config.loggerConfig.getName().equals(getName()) ? config.loggerConfig.getParent() :
+        final LoggerConfig lc = config.loggerConfig.getName().equals(getName()) ? config.loggerConfig.getParent() :
             config.loggerConfig;
         if (lc == null) {
             return null;
@@ -268,7 +268,7 @@ public class Logger extends AbstractLogg
         }
 
         // LOG4J2-151: changed visibility to public
-        public void logEvent(LogEvent event) {
+        public void logEvent(final LogEvent event) {
             config.getConfigurationMonitor().checkConfiguration();
             loggerConfig.log(event);
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java Tue Jul  9 06:08:25 2013
@@ -150,7 +150,7 @@ public class LoggerContext implements or
                     shutdownThread = new ShutdownThread(this);
                     try {
                         Runtime.getRuntime().addShutdownHook(shutdownThread);
-                    } catch (SecurityException se) {
+                    } catch (final SecurityException se) {
                         LOGGER.warn("Unable to register shutdown hook due to security restrictions");
                         shutdownThread = null;
                     }
@@ -173,7 +173,7 @@ public class LoggerContext implements or
                     shutdownThread = new ShutdownThread(this);
                     try {
                         Runtime.getRuntime().addShutdownHook(shutdownThread);
-                    } catch (SecurityException se) {
+                    } catch (final SecurityException se) {
                         LOGGER.warn("Unable to register shutdown hook due to security restrictions");
                         shutdownThread = null;
                     }
@@ -198,7 +198,7 @@ public class LoggerContext implements or
                 Runtime.getRuntime().removeShutdownHook(shutdownThread);
                 shutdownThread = null;
             }
-            Configuration prev = config;
+            final Configuration prev = config;
             config = new NullConfiguration();
             updateLoggers();
             prev.stop();
@@ -337,18 +337,18 @@ public class LoggerContext implements or
         }
 
         // notify listeners
-        PropertyChangeEvent evt = new PropertyChangeEvent(this, PROPERTY_CONFIG, prev, config);
-        for (PropertyChangeListener listener : propertyChangeListeners) {
+        final PropertyChangeEvent evt = new PropertyChangeEvent(this, PROPERTY_CONFIG, prev, config);
+        for (final PropertyChangeListener listener : propertyChangeListeners) {
             listener.propertyChange(evt);
         }
         return prev;
     }
 
-    public void addPropertyChangeListener(PropertyChangeListener listener) {
+    public void addPropertyChangeListener(final PropertyChangeListener listener) {
         propertyChangeListeners.add(Assert.isNotNull(listener, "listener"));
     }
 
-    public void removePropertyChangeListener(PropertyChangeListener listener) {
+    public void removePropertyChangeListener(final PropertyChangeListener listener) {
         propertyChangeListeners.remove(listener);
     }
 
@@ -356,7 +356,7 @@ public class LoggerContext implements or
         return configLocation;
     }
 
-    public synchronized void setConfigLocation(URI configLocation) {
+    public synchronized void setConfigLocation(final URI configLocation) {
         this.configLocation = configLocation;
         reconfigure();
     }
@@ -419,7 +419,7 @@ public class LoggerContext implements or
 
         private final LoggerContext context;
 
-        public ShutdownThread(LoggerContext context) {
+        public ShutdownThread(final LoggerContext context) {
             this.context = context;
         }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java Tue Jul  9 06:08:25 2013
@@ -131,7 +131,7 @@ public final class AsyncAppender<T exten
                     // wait for free slots in the queue
                     queue.put(Log4jLogEvent.serialize((Log4jLogEvent) event, includeLocation));
                     appendSuccessful = true;
-                } catch (InterruptedException e) {
+                } catch (final InterruptedException e) {
                     LOGGER.warn("Interrupted while waiting for a free slot in the AsyncAppender LogEvent-queue {}",
                             getName());
                 }
@@ -241,7 +241,7 @@ public final class AsyncAppender<T exten
             // Process any remaining items in the queue.
             while (!queue.isEmpty()) {
                 try {
-                    Serializable s = queue.take();
+                    final Serializable s = queue.take();
                     if (s instanceof Log4jLogEvent) {
                         final Log4jLogEvent event = Log4jLogEvent.deserialize(s);
                         event.setEndOfBatch(queue.isEmpty());

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java Tue Jul  9 06:08:25 2013
@@ -92,6 +92,7 @@ public final class ConsoleAppender<T ext
         }
         if (layout == null) {
             @SuppressWarnings({ "unchecked", "UnnecessaryLocalVariable" })
+            final
             Layout<S> l = (Layout<S>) PatternLayout.createLayout(null, null, null, null, null);
             layout = l;
         }
@@ -114,10 +115,10 @@ public final class ConsoleAppender<T ext
             printStream = target == Target.SYSTEM_OUT ?
             follow ? new PrintStream(new SystemOutStream(), true, enc) : System.out :
             follow ? new PrintStream(new SystemErrStream(), true, enc) : System.err;
-        } catch (UnsupportedEncodingException ex) { // should never happen
+        } catch (final UnsupportedEncodingException ex) { // should never happen
             throw new IllegalStateException("Unsupported default encoding " + enc, ex);
         }
-        PropertiesUtil propsUtil = PropertiesUtil.getProperties();
+        final PropertiesUtil propsUtil = PropertiesUtil.getProperties();
         if (!propsUtil.getStringProperty("os.name").startsWith("Windows") ||
             propsUtil.getBooleanProperty("log4j.skipJansi")) {
             return printStream;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastFileAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastFileAppender.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastFileAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastFileAppender.java Tue Jul  9 06:08:25 2013
@@ -44,12 +44,12 @@ public final class FastFileAppender<T ex
     private Object advertisement;
     private final Advertiser advertiser;
 
-    private FastFileAppender(String name, Layout<T> layout, Filter filter,
-            FastFileManager manager, String filename, boolean handleException,
-            boolean immediateFlush, Advertiser advertiser) {
+    private FastFileAppender(final String name, final Layout<T> layout, final Filter filter,
+            final FastFileManager manager, final String filename, final boolean handleException,
+            final boolean immediateFlush, final Advertiser advertiser) {
         super(name, layout, filter, handleException, immediateFlush, manager);
         if (advertiser != null) {
-            Map<String, String> configuration = new HashMap<String, String>(
+            final Map<String, String> configuration = new HashMap<String, String>(
                     layout.getContentFormat());
             configuration.putAll(manager.getContentFormat());
             configuration.put("contentType", layout.getContentType());
@@ -74,7 +74,7 @@ public final class FastFileAppender<T ex
      * @param event The LogEvent.
      */
     @Override
-    public void append(LogEvent event) {
+    public void append(final LogEvent event) {
 
         // Leverage the nice batching behaviour of async Loggers/Appenders:
         // we can signal the file manager that it needs to flush the buffer
@@ -121,23 +121,23 @@ public final class FastFileAppender<T ex
      */
     @PluginFactory
     public static <S extends Serializable> FastFileAppender<S> createAppender(
-            @PluginAttr("fileName") String fileName,
-            @PluginAttr("append") String append,
-            @PluginAttr("name") String name,
-            @PluginAttr("immediateFlush") String immediateFlush,
-            @PluginAttr("suppressExceptions") String suppress,
+            @PluginAttr("fileName") final String fileName,
+            @PluginAttr("append") final String append,
+            @PluginAttr("name") final String name,
+            @PluginAttr("immediateFlush") final String immediateFlush,
+            @PluginAttr("suppressExceptions") final String suppress,
             @PluginElement("layout") Layout<S> layout,
             @PluginElement("filters") final Filter filter,
             @PluginAttr("advertise") final String advertise,
             @PluginAttr("advertiseURI") final String advertiseURI,
             @PluginConfiguration final Configuration config) {
 
-        boolean isAppend = append == null ? true : Boolean.valueOf(append);
-        boolean isFlush = immediateFlush == null ? true : Boolean
+        final boolean isAppend = append == null ? true : Boolean.valueOf(append);
+        final boolean isFlush = immediateFlush == null ? true : Boolean
                 .valueOf(immediateFlush);
-        boolean handleExceptions = suppress == null ? true : Boolean
+        final boolean handleExceptions = suppress == null ? true : Boolean
                 .valueOf(suppress);
-        boolean isAdvertise = advertise == null ? false : Boolean
+        final boolean isAdvertise = advertise == null ? false : Boolean
                 .valueOf(advertise);
 
         if (name == null) {
@@ -152,10 +152,11 @@ public final class FastFileAppender<T ex
         }
         if (layout == null) {
             @SuppressWarnings({ "unchecked", "UnnecessaryLocalVariable" })
+            final
             Layout<S> l = (Layout<S>) PatternLayout.createLayout(null, null, null, null, null);
             layout = l;
         }
-        FastFileManager manager = FastFileManager.getFileManager(fileName, isAppend, isFlush, advertiseURI, layout);
+        final FastFileManager manager = FastFileManager.getFileManager(fileName, isAppend, isFlush, advertiseURI, layout);
         if (manager == null) {
             return null;
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastFileManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastFileManager.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastFileManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastFileManager.java Tue Jul  9 06:08:25 2013
@@ -40,7 +40,7 @@ public class FastFileManager extends Out
     private final String advertiseURI;
     private final RandomAccessFile randomAccessFile;
     private final ByteBuffer buffer;
-    private ThreadLocal<Boolean> isEndOfBatch = new ThreadLocal<Boolean>();
+    private final ThreadLocal<Boolean> isEndOfBatch = new ThreadLocal<Boolean>();
 
     protected FastFileManager(final RandomAccessFile file,
             final String fileName, final OutputStream os,
@@ -79,12 +79,12 @@ public class FastFileManager extends Out
         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;
@@ -108,8 +108,8 @@ public class FastFileManager extends Out
         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();
@@ -138,11 +138,11 @@ public class FastFileManager extends Out
     /** {@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 {
         }
     }
 
@@ -155,7 +155,7 @@ public class FastFileManager extends Out
      */
     @Override
     public Map<String, String> getContentFormat() {
-        Map<String, String> result = new HashMap<String, String>(
+        final Map<String, String> result = new HashMap<String, String>(
                 super.getContentFormat());
         result.put("fileURI", advertiseURI);
         return result;
@@ -198,8 +198,8 @@ public class FastFileManager extends Out
          * @return The FastFileManager for the File.
          */
         @Override
-        public FastFileManager createManager(String name, FactoryData data) {
-            File file = new File(name);
+        public FastFileManager 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();
@@ -208,7 +208,7 @@ public class FastFileManager extends Out
                 file.delete();
             }
 
-            OutputStream os = new DummyOutputStream();
+            final OutputStream os = new DummyOutputStream();
             RandomAccessFile raf;
             try {
                 raf = new RandomAccessFile(name, "rw");
@@ -219,7 +219,7 @@ public class FastFileManager extends Out
                 }
                 return new FastFileManager(raf, name, os, data.immediateFlush,
                         data.advertiseURI, data.layout);
-            } catch (Exception ex) {
+            } catch (final Exception ex) {
                 LOGGER.error("FastFileManager (" + name + ") " + ex);
             }
             return null;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastRollingFileAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastRollingFileAppender.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastRollingFileAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastRollingFileAppender.java Tue Jul  9 06:08:25 2013
@@ -51,13 +51,13 @@ public final class FastRollingFileAppend
     private Object advertisement;
     private final Advertiser advertiser;
 
-    private FastRollingFileAppender(String name, Layout<T> layout,
-            Filter filter, RollingFileManager manager, String fileName,
-            String filePattern, boolean handleException,
-            boolean immediateFlush, Advertiser advertiser) {
+    private FastRollingFileAppender(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, final Advertiser advertiser) {
         super(name, layout, filter, handleException, immediateFlush, manager);
         if (advertiser != null) {
-            Map<String, String> configuration = new HashMap<String, String>(
+            final Map<String, String> configuration = new HashMap<String, String>(
                     layout.getContentFormat());
             configuration.put("contentType", layout.getContentType());
             configuration.put("name", name);
@@ -83,7 +83,7 @@ public final class FastRollingFileAppend
      */
     @Override
     public void append(final LogEvent event) {
-        FastRollingFileManager manager = (FastRollingFileManager) getManager();
+        final FastRollingFileManager manager = (FastRollingFileManager) getManager();
         manager.checkRollover(event);
 
         // Leverage the nice batching behaviour of async Loggers/Appenders:
@@ -163,7 +163,7 @@ public final class FastRollingFileAppend
                 .valueOf(suppress);
         final boolean isFlush = immediateFlush == null ? true : Boolean
                 .valueOf(immediateFlush);
-        boolean isAdvertise = advertise == null ? false : Boolean
+        final boolean isAdvertise = advertise == null ? false : Boolean
                 .valueOf(advertise);
 
         if (name == null) {
@@ -195,6 +195,7 @@ public final class FastRollingFileAppend
 
         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/FileAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileAppender.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileAppender.java Tue Jul  9 06:08:25 2013
@@ -45,10 +45,10 @@ public final class FileAppender<T extend
 
     private FileAppender(final String name, final Layout<T> layout, final Filter filter, final FileManager manager,
                          final String filename, 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.putAll(manager.getContentFormat());
             configuration.put("contentType", layout.getContentType());
             configuration.put("name", name);
@@ -112,7 +112,7 @@ public final class FileAppender<T extend
         final boolean isAppend = append == null ? true : Boolean.valueOf(append);
         final boolean isLocking = locking == null ? false : Boolean.valueOf(locking);
         boolean isBuffered = bufferedIO == null ? true : Boolean.valueOf(bufferedIO);
-        boolean isAdvertise = advertise == null ? false : Boolean.valueOf(advertise);
+        final boolean isAdvertise = advertise == null ? false : Boolean.valueOf(advertise);
         if (isLocking && isBuffered) {
             if (bufferedIO != null) {
                 LOGGER.warn("Locking and buffering are mutually exclusive. No buffering will occur for " + fileName);
@@ -133,6 +133,7 @@ public final class FileAppender<T extend
         }
         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/FileManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileManager.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileManager.java Tue Jul  9 06:08:25 2013
@@ -129,7 +129,7 @@ public class FileManager extends OutputS
      */
     @Override
     public Map<String, String> getContentFormat() {
-        Map<String, String> result = new HashMap<String, String>(super.getContentFormat());
+        final Map<String, String> result = new HashMap<String, String>(super.getContentFormat());
         result.put("fileURI", advertiseURI);
         return result;
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSQueueAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSQueueAppender.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSQueueAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSQueueAppender.java Tue Jul  9 06:08:25 2013
@@ -105,6 +105,7 @@ public final class JMSQueueAppender<T ex
         }
         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/JMSTopicAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSTopicAppender.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSTopicAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSTopicAppender.java Tue Jul  9 06:08:25 2013
@@ -106,6 +106,7 @@ public final class JMSTopicAppender<T ex
         }
         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/OutputStreamManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/OutputStreamManager.java?rev=1501104&r1=1501103&r2=1501104&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/OutputStreamManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/OutputStreamManager.java Tue Jul  9 06:08:25 2013
@@ -130,7 +130,7 @@ public class OutputStreamManager extends
     }
 
     protected void close() {
-        OutputStream stream = os; // access volatile field only once per method
+        final OutputStream stream = os; // access volatile field only once per method
         if (stream == System.out || stream == System.err) {
             return;
         }



Mime
View raw message