logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1431609 - 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/util/ api/src/test/java/org/apache/logging/log4j/ api/src/...
Date Thu, 10 Jan 2013 20:23:35 GMT
Author: ggregory
Date: Thu Jan 10 20:23:34 2013
New Revision: 1431609

URL: http://svn.apache.org/viewvc?rev=1431609&view=rev
Log:
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/ThreadContext.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/MessageFormatMessage.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.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/FormattedMessageTest.java
    logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/LocalizedMessageTest.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/MessageFormatsPerfTest.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/AbstractOutputStreamAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FailoverAppender.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/helpers/CyclicBuffer.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NameUtil.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/PropertiesUtil.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.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/net/JMSQueueManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/MimeMessageBuilder.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/ExtendedThrowablePatternConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/RootThrowablePatternConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SimpleSmtpServer.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/dumbster/smtp/SmtpRequest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LogEventTest.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/appender/AsynchAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SMTPAppenderTest.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/config/TestConfigurator.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/layout/SerializedLayoutTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/SyslogLayoutTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/util/JunitTestRunnerFilter.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/util/Transformer.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/FailOnceAppender.java
    logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java
    logging/log4j/log4j2/trunk/log4j-to-slf4j/src/test/java/org/apache/logging/slf4j/LoggerTest.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=1431609&r1=1431608&r2=1431609&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 Thu Jan 10 20:23:34 2013
@@ -81,10 +81,10 @@ public class LogManager {
             final SortedMap<Integer, LoggerContextFactory> factories = new TreeMap<Integer, LoggerContextFactory>();
 
             if (ProviderUtil.hasProviders()) {
-                Iterator<Provider> providers = ProviderUtil.getProviders();
+                final Iterator<Provider> providers = ProviderUtil.getProviders();
                 while (providers.hasNext()) {
-                    Provider provider = providers.next();
-                    String className = provider.getClassName();
+                    final Provider provider = providers.next();
+                    final String className = provider.getClassName();
                     if (className != null) {
                         try {
                             final Class<?> clazz = cl.loadClass(className);

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/ThreadContext.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/ThreadContext.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/ThreadContext.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/ThreadContext.java Thu Jan 10 20:23:34 2013
@@ -89,12 +89,12 @@ public final class ThreadContext  {
             }
         }
         if (contextMap == null && ProviderUtil.hasProviders()) {
-            LoggerContextFactory factory = LogManager.getFactory();
-            Iterator<Provider> providers = ProviderUtil.getProviders();
+            final LoggerContextFactory factory = LogManager.getFactory();
+            final Iterator<Provider> providers = ProviderUtil.getProviders();
             while (providers.hasNext()) {
-                Provider provider = providers.next();
+                final Provider provider = providers.next();
                 threadContextMapName = provider.getThreadContextMap();
-                String factoryClassName = provider.getClassName();
+                final String factoryClassName = provider.getClassName();
                 if (threadContextMapName != null && factory.getClass().getName().equals(factoryClassName)) {
                     try {
                         final Class<?> clazz = cl.loadClass(threadContextMapName);

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java Thu Jan 10 20:23:34 2013
@@ -123,19 +123,19 @@ public class FormattedMessage implements
 
     protected Message getMessage(String msgPattern, Object[] args, Throwable throwable) {
         try {
-            MessageFormat format = new MessageFormat(msgPattern);
-            Format[] formats = format.getFormats();
+            final MessageFormat format = new MessageFormat(msgPattern);
+            final Format[] formats = format.getFormats();
             if (formats != null && formats.length > 0) {
                 return new MessageFormatMessage(msgPattern, args);
             }
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             // Obviously, the message is not a proper pattern for MessageFormat.
         }
         try {
             if (MSG_PATTERN.matcher(msgPattern).find()) {
                 return new StringFormattedMessage(msgPattern, args);
             }
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             // Also not properly formatted.
         }
         return new ParameterizedMessage(msgPattern, args, throwable);
@@ -150,7 +150,7 @@ public class FormattedMessage implements
             return false;
         }
 
-        FormattedMessage that = (FormattedMessage) o;
+        final FormattedMessage that = (FormattedMessage) o;
 
         if (messagePattern != null ? !messagePattern.equals(that.messagePattern) : that.messagePattern != null) {
             return false;
@@ -184,7 +184,7 @@ public class FormattedMessage implements
         out.writeInt(argArray.length);
         stringArgs = new String[argArray.length];
         int i = 0;
-        for (Object obj : argArray) {
+        for (final Object obj : argArray) {
             stringArgs[i] = obj.toString();
             ++i;
         }
@@ -194,7 +194,7 @@ public class FormattedMessage implements
         in.defaultReadObject();
         formattedMessage = in.readUTF();
         messagePattern = in.readUTF();
-        int length = in.readInt();
+        final int length = in.readInt();
         stringArgs = new String[length];
         for (int i = 0; i < length; ++i) {
             stringArgs[i] = in.readUTF();

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java Thu Jan 10 20:23:34 2013
@@ -176,11 +176,11 @@ public class LocalizedMessage implements
                 bundle = getBundle(loggerName, locale, true);
             }
         }
-        String messagePattern = getFormat();
-        String msgPattern = (bundle == null || !bundle.containsKey(messagePattern)) ?
+        final String messagePattern = getFormat();
+        final String msgPattern = (bundle == null || !bundle.containsKey(messagePattern)) ?
             messagePattern : bundle.getString(messagePattern);
-        Object[] array = argArray == null ? stringArgs : argArray;
-        FormattedMessage msg = new FormattedMessage(msgPattern, array);
+        final Object[] array = argArray == null ? stringArgs : argArray;
+        final FormattedMessage msg = new FormattedMessage(msgPattern, array);
         formattedMessage = msg.getFormattedMessage();
         throwable = msg.getThrowable();
         return formattedMessage;
@@ -254,7 +254,7 @@ public class LocalizedMessage implements
         out.writeInt(argArray.length);
         stringArgs = new String[argArray.length];
         int i = 0;
-        for (Object obj : argArray) {
+        for (final Object obj : argArray) {
             stringArgs[i] = obj.toString();
             ++i;
         }
@@ -265,7 +265,7 @@ public class LocalizedMessage implements
         formattedMessage = in.readUTF();
         messagePattern = in.readUTF();
         bundleId = in.readUTF();
-        int length = in.readInt();
+        final int length = in.readInt();
         stringArgs = new String[length];
         for (int i = 0; i < length; ++i) {
             stringArgs[i] = in.readUTF();

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/MessageFormatMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/MessageFormatMessage.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/MessageFormatMessage.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/MessageFormatMessage.java Thu Jan 10 20:23:34 2013
@@ -81,7 +81,7 @@ public class MessageFormatMessage implem
     protected String formatMessage(String msgPattern, Object... args) {
         try {
             return MessageFormat.format(msgPattern, args);
-        } catch (IllegalFormatException ife) {
+        } catch (final IllegalFormatException ife) {
             LOGGER.error("Unable to format msg: " + msgPattern, ife);
             return msgPattern;
         }
@@ -96,7 +96,7 @@ public class MessageFormatMessage implem
             return false;
         }
 
-        MessageFormatMessage that = (MessageFormatMessage) o;
+        final MessageFormatMessage that = (MessageFormatMessage) o;
 
         if (messagePattern != null ? !messagePattern.equals(that.messagePattern) : that.messagePattern != null) {
             return false;
@@ -130,7 +130,7 @@ public class MessageFormatMessage implem
         out.writeInt(argArray.length);
         stringArgs = new String[argArray.length];
         int i = 0;
-        for (Object obj : argArray) {
+        for (final Object obj : argArray) {
             stringArgs[i] = obj.toString();
             ++i;
         }
@@ -140,7 +140,7 @@ public class MessageFormatMessage implem
         in.defaultReadObject();
         formattedMessage = in.readUTF();
         messagePattern = in.readUTF();
-        int length = in.readInt();
+        final int length = in.readInt();
         stringArgs = new String[length];
         for (int i = 0; i < length; ++i) {
             stringArgs[i] = in.readUTF();

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java Thu Jan 10 20:23:34 2013
@@ -48,7 +48,7 @@ public final class ProviderUtil {
     }
 
     static {
-        ClassLoader cl = findClassLoader();
+        final ClassLoader cl = findClassLoader();
         Enumeration<URL> enumResources = null;
         try {
             enumResources = cl.getResources(PROVIDER_RESOURCE);

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=1431609&r1=1431608&r2=1431609&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 Thu Jan 10 20:23:34 2013
@@ -63,7 +63,7 @@ public class ThreadContextTest {
 
         @Override
         public void run() {
-            String greeting = ThreadContext.get("Greeting");
+            final String greeting = ThreadContext.get("Greeting");
             if (greeting == null) {
                 sb.append("null");
             } else {

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/FormattedMessageTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/FormattedMessageTest.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/FormattedMessageTest.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/FormattedMessageTest.java Thu Jan 10 20:23:34 2013
@@ -30,12 +30,12 @@ public class FormattedMessageTest {
 
     @Test
     public void testStringNoArgs() {
-        String testMsg = "Test message %1s";
+        final String testMsg = "Test message %1s";
         FormattedMessage msg = new FormattedMessage(testMsg, (Object[]) null);
         String result = msg.getFormattedMessage();
-        String expected = "Test message null";
+        final String expected = "Test message null";
         assertEquals(expected, result);
-        Object[] array = null;
+        final Object[] array = null;
         msg = new FormattedMessage(testMsg, array, null);
         result = msg.getFormattedMessage();
         assertEquals(expected, result);
@@ -43,21 +43,21 @@ public class FormattedMessageTest {
 
     @Test
     public void tesStringtOneArg() {
-        String testMsg = "Test message %1s";
-        FormattedMessage msg = new FormattedMessage(testMsg, "Apache");
-        String result = msg.getFormattedMessage();
-        String expected = "Test message Apache";
+        final String testMsg = "Test message %1s";
+        final FormattedMessage msg = new FormattedMessage(testMsg, "Apache");
+        final String result = msg.getFormattedMessage();
+        final String expected = "Test message Apache";
         assertEquals(expected, result);
     }
 
     @Test
     public void testNoArgs() {
-        String testMsg = "Test message {0}";
+        final String testMsg = "Test message {0}";
         FormattedMessage msg = new FormattedMessage(testMsg, (Object[]) null);
         String result = msg.getFormattedMessage();
-        String expected = "Test message {0}";
+        final String expected = "Test message {0}";
         assertEquals(expected, result);
-        Object[] array = null;
+        final Object[] array = null;
         msg = new FormattedMessage(testMsg, array, null);
         result = msg.getFormattedMessage();
         assertEquals(expected, result);
@@ -65,20 +65,20 @@ public class FormattedMessageTest {
 
     @Test
     public void testOneArg() {
-        String testMsg = "Test message {0}";
-        FormattedMessage msg = new FormattedMessage(testMsg, "Apache");
-        String result = msg.getFormattedMessage();
-        String expected = "Test message Apache";
+        final String testMsg = "Test message {0}";
+        final FormattedMessage msg = new FormattedMessage(testMsg, "Apache");
+        final String result = msg.getFormattedMessage();
+        final String expected = "Test message Apache";
         assertEquals(expected, result);
     }
 
     @Test
     public void testParamNoArgs() {
-        String testMsg = "Test message {}";
+        final String testMsg = "Test message {}";
         FormattedMessage msg = new FormattedMessage(testMsg, null);
         String result = msg.getFormattedMessage();
         assertEquals(testMsg, result);
-        Object[] array = null;
+        final Object[] array = null;
         msg = new FormattedMessage(testMsg, array, null);
         result = msg.getFormattedMessage();
         assertEquals(testMsg, result);

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/LocalizedMessageTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/LocalizedMessageTest.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/LocalizedMessageTest.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/LocalizedMessageTest.java Thu Jan 10 20:23:34 2013
@@ -33,18 +33,18 @@ public class LocalizedMessageTest {
 
     @Test
     public void testMessageFormat() {
-        LocalizedMessage msg = new LocalizedMessage("MF", new Locale("en_US"), "msg1", new Object[] {"1", "Test"});
-        String result = msg.getFormattedMessage();
-        String expected = "This is test number 1 with string argument Test.";
+        final LocalizedMessage msg = new LocalizedMessage("MF", new Locale("en_US"), "msg1", new Object[] {"1", "Test"});
+        final String result = msg.getFormattedMessage();
+        final String expected = "This is test number 1 with string argument Test.";
         assertTrue(expected.equals(result));
     }
 
 
     @Test
     public void testStringFormat() {
-        LocalizedMessage msg = new LocalizedMessage("SF", new Locale("en_US"), "msg1", new Object[] {"1", "Test"});
-        String result = msg.getFormattedMessage();
-        String expected = "This is test number 1 with string argument Test.";
+        final LocalizedMessage msg = new LocalizedMessage("SF", new Locale("en_US"), "msg1", new Object[] {"1", "Test"});
+        final String result = msg.getFormattedMessage();
+        final String expected = "This is test number 1 with string argument Test.";
         assertTrue(expected.equals(result));
     }
 }

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=1431609&r1=1431608&r2=1431609&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 Thu Jan 10 20:23:34 2013
@@ -30,12 +30,12 @@ public class MessageFormatMessageTest {
 
     @Test
     public void testNoArgs() {
-        String testMsg = "Test message {0}";
+        final String testMsg = "Test message {0}";
         MessageFormatMessage msg = new MessageFormatMessage(testMsg, (Object[]) null);
         String result = msg.getFormattedMessage();
         String expected = "Test message {0}";
         assertEquals(expected, result);
-        Object[] array = null;
+        final Object[] array = null;
         msg = new MessageFormatMessage(testMsg, array, null);
         result = msg.getFormattedMessage();
         expected = "Test message null";
@@ -44,10 +44,10 @@ public class MessageFormatMessageTest {
 
     @Test
     public void testOneArg() {
-        String testMsg = "Test message {0}";
-        MessageFormatMessage msg = new MessageFormatMessage(testMsg, "Apache");
-        String result = msg.getFormattedMessage();
-        String expected = "Test message Apache";
+        final String testMsg = "Test message {0}";
+        final MessageFormatMessage msg = new MessageFormatMessage(testMsg, "Apache");
+        final String result = msg.getFormattedMessage();
+        final String expected = "Test message Apache";
         assertEquals(expected, result);
     }
 }

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/MessageFormatsPerfTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/MessageFormatsPerfTest.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/MessageFormatsPerfTest.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/MessageFormatsPerfTest.java Thu Jan 10 20:23:34 2013
@@ -65,11 +65,11 @@ public class MessageFormatsPerfTest {
 
     @Test
     public void testStringPerf() {
-        String testMsg = "Test message %1s %2s";
-        Timer timer = new Timer("StringFormat", LOOP_CNT);
+        final String testMsg = "Test message %1s %2s";
+        final Timer timer = new Timer("StringFormat", LOOP_CNT);
         timer.start();
         for (int i = 0; i < LOOP_CNT; ++i) {
-            StringFormattedMessage msg = new StringFormattedMessage(testMsg, "Apache", "Log4j");
+            final StringFormattedMessage msg = new StringFormattedMessage(testMsg, "Apache", "Log4j");
             array[i] = msg.getFormattedMessage();
         }
         timer.stop();
@@ -79,11 +79,11 @@ public class MessageFormatsPerfTest {
 
     @Test
     public void testMessageFormatPerf() {
-        String testMsg = "Test message {0} {1}";
-        Timer timer = new Timer("MessageFormat", LOOP_CNT);
+        final String testMsg = "Test message {0} {1}";
+        final Timer timer = new Timer("MessageFormat", LOOP_CNT);
         timer.start();
         for (int i = 0; i < LOOP_CNT; ++i) {
-            MessageFormatMessage msg = new MessageFormatMessage(testMsg, "Apache", "Log4j");
+            final MessageFormatMessage msg = new MessageFormatMessage(testMsg, "Apache", "Log4j");
             array[i] = msg.getFormattedMessage();
         }
         timer.stop();
@@ -93,11 +93,11 @@ public class MessageFormatsPerfTest {
 
     @Test
     public void testParameterizedPerf() {
-        String testMsg = "Test message {} {}";
-        Timer timer = new Timer("Parameterized", LOOP_CNT);
+        final String testMsg = "Test message {} {}";
+        final Timer timer = new Timer("Parameterized", LOOP_CNT);
         timer.start();
         for (int i = 0; i < LOOP_CNT; ++i) {
-            ParameterizedMessage msg = new ParameterizedMessage(testMsg, "Apache", "Log4j");
+            final ParameterizedMessage msg = new ParameterizedMessage(testMsg, "Apache", "Log4j");
             array[i] = msg.getFormattedMessage();
         }
         timer.stop();
@@ -107,11 +107,11 @@ public class MessageFormatsPerfTest {
 
     @Test
     public void testFormattedParameterizedPerf() {
-        String testMsg = "Test message {} {}";
-        Timer timer = new Timer("FormattedParameterized", LOOP_CNT);
+        final String testMsg = "Test message {} {}";
+        final Timer timer = new Timer("FormattedParameterized", LOOP_CNT);
         timer.start();
         for (int i = 0; i < LOOP_CNT; ++i) {
-            FormattedMessage msg = new FormattedMessage(testMsg, "Apache", "Log4j");
+            final FormattedMessage msg = new FormattedMessage(testMsg, "Apache", "Log4j");
             array[i] = msg.getFormattedMessage();
         }
         timer.stop();

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=1431609&r1=1431608&r2=1431609&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 Thu Jan 10 20:23:34 2013
@@ -263,7 +263,7 @@ public class LoggerContext implements or
         }
         final Configuration prev = this.config;
         config.addListener(this);
-        Map<String, String> map = new HashMap<String, String>();
+        final Map<String, String> map = new HashMap<String, String>();
         map.put("hostName", NetUtils.getLocalHostname());
         map.put("contextName", name);
         config.addComponent(Configuration.CONTEXT_PROPERTIES, map);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractOutputStreamAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractOutputStreamAppender.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractOutputStreamAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractOutputStreamAppender.java Thu Jan 10 20:23:34 2013
@@ -109,7 +109,7 @@ public abstract class AbstractOutputStre
     public void append(final LogEvent event) {
         readLock.lock();
         try {
-            byte[] bytes = getLayout().toByteArray(event);
+            final byte[] bytes = getLayout().toByteArray(event);
             if (bytes.length > 0) {
                 manager.write(bytes);
                 if (this.immediateFlush) {

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FailoverAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FailoverAppender.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FailoverAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FailoverAppender.java Thu Jan 10 20:23:34 2013
@@ -100,7 +100,7 @@ public final class FailoverAppender exte
      * @param event The LogEvent.
      */
     public void append(final LogEvent event) {
-        RuntimeException re = null;
+        final RuntimeException re = null;
         if (!isStarted()) {
             error("FailoverAppender " + getName() + " did not start successfully");
             return;
@@ -108,7 +108,7 @@ public final class FailoverAppender exte
         if (!failure) {
             callAppender(event);
         } else {
-            long current = System.currentTimeMillis();
+            final long current = System.currentTimeMillis();
             if (current >= nextCheck) {
                 callAppender(event);
             } else {
@@ -128,7 +128,7 @@ public final class FailoverAppender exte
     }
 
     private void failover(final LogEvent event, Exception ex) {
-        RuntimeException re = ex != null ? new LoggingException(ex) : null;
+        final RuntimeException re = ex != null ? new LoggingException(ex) : null;
         boolean written = false;
         Exception failoverException = null;
         for (final AppenderControl control : failoverAppenders) {
@@ -205,14 +205,14 @@ public final class FailoverAppender exte
             retryInterval = DEFAULT_INTERVAL;
         } else {
             try {
-                int value = Integer.parseInt(interval);
+                final int value = Integer.parseInt(interval);
                 if (value >= 0) {
                     retryInterval = value * Constants.MILLIS_IN_SECONDS;
                 } else {
                     LOGGER.warn("Interval " + interval + " is less than zero. Using default");
                     retryInterval = DEFAULT_INTERVAL;
                 }
-            } catch (NumberFormatException nfe) {
+            } catch (final NumberFormatException nfe) {
                 LOGGER.error("Interval " + interval + " is non-numeric. Using default");
                 retryInterval = DEFAULT_INTERVAL;
             }

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=1431609&r1=1431608&r2=1431609&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 Thu Jan 10 20:23:34 2013
@@ -170,8 +170,8 @@ public class BaseConfiguration extends A
                 }
                 continue;
             } else if (tempLookup == subst.getVariableResolver()) {
-                Map<String, String> map = (Map<String, String>) componentMap.get(CONTEXT_PROPERTIES);
-                StrLookup lookup = map == null ? null : new MapLookup(map);
+                final Map<String, String> map = (Map<String, String>) componentMap.get(CONTEXT_PROPERTIES);
+                final StrLookup lookup = map == null ? null : new MapLookup(map);
                 subst.setVariableResolver(new Interpolator(lookup));
             }
             if (child.getName().equalsIgnoreCase("appenders")) {

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CyclicBuffer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CyclicBuffer.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CyclicBuffer.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CyclicBuffer.java Thu Jan 10 20:23:34 2013
@@ -63,7 +63,7 @@ public class CyclicBuffer<T> {
     }
 
     public synchronized T[] removeAll() {
-        T[] array = makeArray(clazz, numElems);
+        final T[] array = makeArray(clazz, numElems);
         int index = 0;
         while (numElems > 0) {
             numElems--;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NameUtil.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NameUtil.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NameUtil.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NameUtil.java Thu Jan 10 20:23:34 2013
@@ -48,7 +48,7 @@ public final class NameUtil {
                 md5.append(hex);
             }
             return md5.toString();
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             return string;
         }
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/PropertiesUtil.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/PropertiesUtil.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/PropertiesUtil.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/PropertiesUtil.java Thu Jan 10 20:23:34 2013
@@ -39,7 +39,7 @@ public final class PropertiesUtil {
     public static String getSystemProperty(final String key) {
         try {
             return System.getProperty(key);
-        } catch (SecurityException ex) {
+        } catch (final SecurityException ex) {
             LOGGER.error("Unable to access system property {} due to security restrictions. Defaulting to null",
                 key);
             return null;
@@ -55,9 +55,9 @@ public final class PropertiesUtil {
      */
     public static String getSystemProperty(final String key, final String defaultValue) {
         try {
-            String value = System.getProperty(key);
+            final String value = System.getProperty(key);
             return value == null ? defaultValue : value;
-        } catch (SecurityException ex) {
+        } catch (final SecurityException ex) {
             LOGGER.warn("Unable to access system property {} due to security restrictions. Defaulting to {}",
                 key, defaultValue);
             return defaultValue;
@@ -71,7 +71,7 @@ public final class PropertiesUtil {
     public static Properties getSystemProperties() {
         try {
             return new Properties(System.getProperties());
-        } catch (SecurityException ex) {
+        } catch (final SecurityException ex) {
             LOGGER.error("Unable to access system properties.");
             // Sandboxed - can't read System Properties
             return new Properties();

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java Thu Jan 10 20:23:34 2013
@@ -110,7 +110,7 @@ public class ThrowableProxy extends Thro
 
     @Override
     public String toString() {
-        String msg = getMessage();
+        final String msg = getMessage();
         return msg != null ? name + ": " + msg : name;
     }
 
@@ -190,7 +190,7 @@ public class ThrowableProxy extends Thro
      */
     public String getExtendedStackTrace(final List<String> packages) {
         final StringBuilder sb = new StringBuilder(name);
-        String msg = getMessage();
+        final String msg = getMessage();
         if (msg != null) {
             sb.append(": ").append(getMessage());
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java Thu Jan 10 20:23:34 2013
@@ -244,8 +244,8 @@ public final class RFC5424Layout extends
             buf.append(escapeNewlines(msg.getFormattedMessage(), escapeNewLine));
         }
         if (formatters != null && event.getThrown() != null) {
-            StringBuilder exception = new StringBuilder("\n");
-            for (PatternFormatter formatter : formatters) {
+            final StringBuilder exception = new StringBuilder("\n");
+            for (final PatternFormatter formatter : formatters) {
                 formatter.format(event, exception);
             }
             buf.append(escapeNewlines(exception.toString(), escapeNewLine));

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueManager.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueManager.java Thu Jan 10 20:23:34 2013
@@ -104,7 +104,7 @@ public class JMSQueueManager extends Abs
         }
         try {
             super.send(object, info.session, info.sender);
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             cleanup(true);
             throw ex;
         }
@@ -120,14 +120,14 @@ public class JMSQueueManager extends Abs
     private void cleanup(boolean quiet) {
         try {
             info.session.close();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             if (!quiet) {
                 LOGGER.error("Error closing session for " + getName(), e);
             }
         }
         try {
             info.conn.close();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             if (!quiet) {
                 LOGGER.error("Error closing connection for " + getName(), e);
             }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java Thu Jan 10 20:23:34 2013
@@ -105,7 +105,7 @@ public class JMSTopicManager extends Abs
         super.send(object, info.session, info.publisher);
         try {
             super.send(object, info.session, info.publisher);
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             cleanup(true);
             throw ex;
         }
@@ -121,14 +121,14 @@ public class JMSTopicManager extends Abs
     private void cleanup(boolean quiet) {
         try {
             info.session.close();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             if (!quiet) {
                 LOGGER.error("Error closing session for " + getName(), e);
             }
         }
         try {
             info.conn.close();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             if (!quiet) {
                 LOGGER.error("Error closing connection for " + getName(), e);
             }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/MimeMessageBuilder.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/MimeMessageBuilder.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/MimeMessageBuilder.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/MimeMessageBuilder.java Thu Jan 10 20:23:34 2013
@@ -34,14 +34,14 @@ public class MimeMessageBuilder {
     }
 
     public MimeMessageBuilder setFrom(final String from) throws MessagingException {
-        InternetAddress address = parseAddress(from);
+        final InternetAddress address = parseAddress(from);
 
         if (null != address) {
             message.setFrom(address);
         } else {
             try {
                 message.setFrom();
-            } catch (Exception ex) {
+            } catch (final Exception ex) {
                 message.setFrom(null);
             }
         }
@@ -49,7 +49,7 @@ public class MimeMessageBuilder {
     }
 
     public MimeMessageBuilder setReplyTo(final String replyTo) throws MessagingException {
-        InternetAddress[] addresses = parseAddresses(replyTo);
+        final InternetAddress[] addresses = parseAddresses(replyTo);
 
         if (null != addresses) {
             message.setReplyTo(addresses);
@@ -59,7 +59,7 @@ public class MimeMessageBuilder {
 
     public MimeMessageBuilder setRecipients(final Message.RecipientType recipientType, final String recipients)
         throws MessagingException {
-        InternetAddress[] addresses = parseAddresses(recipients);
+        final InternetAddress[] addresses = parseAddresses(recipients);
 
         if (null != addresses) {
             message.setRecipients(recipientType, addresses);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java Thu Jan 10 20:23:34 2013
@@ -79,7 +79,7 @@ public class SMTPManager extends Abstrac
             protocol = "smtp";
         }
 
-        StringBuilder sb = new StringBuilder();
+        final StringBuilder sb = new StringBuilder();
         if (to != null) {
             sb.append(to);
         }
@@ -115,7 +115,7 @@ public class SMTPManager extends Abstrac
         sb.append(isDebug ? ":debug:" : "::");
         sb.append(filterName);
 
-        String name = "SMTP:" + NameUtil.md5(sb.toString());
+        final String name = "SMTP:" + NameUtil.md5(sb.toString());
 
         return getManager(name, factory, new FactoryData(to, cc, bcc, from, replyTo, subject,
             protocol, host, port, username, password, isDebug, numElements));
@@ -129,30 +129,30 @@ public class SMTPManager extends Abstrac
             connect();
         }
         try {
-            byte[] rawBytes = formatContentToBytes(buffer, layout);
+            final byte[] rawBytes = formatContentToBytes(buffer, layout);
 
-            String contentType = layout.getContentType();
-            String encoding = getEncoding(rawBytes, contentType);
-            byte[] encodedBytes = encodeContentToBytes(rawBytes, encoding);
+            final String contentType = layout.getContentType();
+            final String encoding = getEncoding(rawBytes, contentType);
+            final byte[] encodedBytes = encodeContentToBytes(rawBytes, encoding);
 
-            InternetHeaders headers = getHeaders(contentType, encoding);
-            MimeMultipart mp = getMimeMultipart(encodedBytes, headers);
+            final InternetHeaders headers = getHeaders(contentType, encoding);
+            final MimeMultipart mp = getMimeMultipart(encodedBytes, headers);
 
             sendMultipartMessage(message, mp);
-        } catch (MessagingException e) {
+        } catch (final MessagingException e) {
             LOGGER.error("Error occurred while sending e-mail notification.", e);
             throw new LoggingException("Error occurred while sending email", e);
-        } catch (IOException e) {
+        } catch (final IOException e) {
             LOGGER.error("Error occurred while sending e-mail notification.", e);
             throw new LoggingException("Error occurred while sending email", e);
-        } catch (RuntimeException e) {
+        } catch (final RuntimeException e) {
             LOGGER.error("Error occurred while sending e-mail notification.", e);
             throw new LoggingException("Error occurred while sending email", e);
         }
     }
 
     protected byte[] formatContentToBytes(CyclicBuffer<LogEvent> cb, Layout<?> layout) throws IOException {
-        ByteArrayOutputStream raw = new ByteArrayOutputStream();
+        final ByteArrayOutputStream raw = new ByteArrayOutputStream();
         writeContent(cb, layout, raw);
         return raw.toByteArray();
     }
@@ -165,55 +165,55 @@ public class SMTPManager extends Abstrac
     }
 
     protected void writeHeader(Layout<?> layout, OutputStream out) throws IOException {
-        byte[] header = layout.getHeader();
+        final byte[] header = layout.getHeader();
         if (header != null) {
             out.write(header);
         }
     }
 
     protected void writeBuffer(CyclicBuffer<LogEvent> cb, Layout<?> layout, OutputStream out) throws IOException {
-        LogEvent[] events = cb.removeAll();
-        for (LogEvent event : events) {
-            byte[] bytes = layout.toByteArray(event);
+        final LogEvent[] events = cb.removeAll();
+        for (final LogEvent event : events) {
+            final byte[] bytes = layout.toByteArray(event);
             out.write(bytes);
         }
     }
 
     protected void writeFooter(Layout<?> layout, OutputStream out) throws IOException {
-        byte[] footer = layout.getFooter();
+        final byte[] footer = layout.getFooter();
         if (footer != null) {
             out.write(footer);
         }
     }
 
     protected String getEncoding(byte[] rawBytes, String contentType) {
-        DataSource dataSource = new ByteArrayDataSource(rawBytes, contentType);
+        final DataSource dataSource = new ByteArrayDataSource(rawBytes, contentType);
         return MimeUtility.getEncoding(dataSource);
     }
 
     protected byte[] encodeContentToBytes(byte[] rawBytes, String encoding) throws MessagingException, IOException {
-        ByteArrayOutputStream encoded = new ByteArrayOutputStream();
+        final ByteArrayOutputStream encoded = new ByteArrayOutputStream();
         encodeContent(rawBytes, encoding, encoded);
         return encoded.toByteArray();
     }
 
     protected void encodeContent(byte[] bytes, String encoding, ByteArrayOutputStream out)
         throws MessagingException, IOException {
-        OutputStream encoder = MimeUtility.encode(out, encoding);
+        final OutputStream encoder = MimeUtility.encode(out, encoding);
         encoder.write(bytes);
         encoder.close();
     }
 
     protected InternetHeaders getHeaders(String contentType, String encoding) {
-        InternetHeaders headers = new InternetHeaders();
+        final InternetHeaders headers = new InternetHeaders();
         headers.setHeader("Content-Type", contentType + "; charset=UTF-8");
         headers.setHeader("Content-Transfer-Encoding", encoding);
         return headers;
     }
 
     protected MimeMultipart getMimeMultipart(byte[] encodedBytes, InternetHeaders headers) throws MessagingException {
-        MimeMultipart mp = new MimeMultipart();
-        MimeBodyPart part = new MimeBodyPart(headers, encodedBytes);
+        final MimeMultipart mp = new MimeMultipart();
+        final MimeBodyPart part = new MimeBodyPart(headers, encodedBytes);
         mp.addBodyPart(part);
         return mp;
     }
@@ -268,7 +268,7 @@ public class SMTPManager extends Abstrac
             message = new MimeMessageBuilder(session).setFrom(data.from).setReplyTo(data.replyto)
                 .setRecipients(Message.RecipientType.TO, data.to).setRecipients(Message.RecipientType.CC, data.cc)
                 .setRecipients(Message.RecipientType.BCC, data.bcc).setSubject(data.subject).getMimeMessage();
-        } catch (MessagingException e) {
+        } catch (final MessagingException e) {
             LOGGER.error("Could not set SMTPAppender message options.", e);
             message = null;
         }
@@ -279,7 +279,7 @@ public class SMTPManager extends Abstrac
         public SMTPManager createManager(final String name, final FactoryData data) {
             final String prefix = "mail." + data.protocol;
 
-            Properties properties = PropertiesUtil.getSystemProperties();
+            final Properties properties = PropertiesUtil.getSystemProperties();
             properties.put("mail.transport.protocol", data.protocol);
             if (properties.getProperty("mail.host") == null) {
                 // Prevent an UnknownHostException in Java 7
@@ -307,7 +307,7 @@ public class SMTPManager extends Abstrac
                 message = new MimeMessageBuilder(session).setFrom(data.from).setReplyTo(data.replyto)
                     .setRecipients(Message.RecipientType.TO, data.to).setRecipients(Message.RecipientType.CC, data.cc)
                     .setRecipients(Message.RecipientType.BCC, data.bcc).setSubject(data.subject).getMimeMessage();
-            } catch (MessagingException e) {
+            } catch (final MessagingException e) {
                 LOGGER.error("Could not set SMTPAppender message options.", e);
                 message = null;
             }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/ExtendedThrowablePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/ExtendedThrowablePatternConverter.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/ExtendedThrowablePatternConverter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/ExtendedThrowablePatternConverter.java Thu Jan 10 20:23:34 2013
@@ -110,7 +110,7 @@ public final class ExtendedThrowablePatt
             if (lines != Integer.MAX_VALUE) {
                 final StringBuilder sb = new StringBuilder();
                 final String[] array = trace.split("\n");
-                int limit = lines > array.length ? array.length : lines;
+                final int limit = lines > array.length ? array.length : lines;
                 for (int i = 0; i < limit; ++i) {
                     sb.append(array[i]).append("\n");
                 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java Thu Jan 10 20:23:34 2013
@@ -169,7 +169,7 @@ public final class PatternParser {
             list.add(new PatternFormatter(pc, field));
         }
         if (handleExceptions && !handlesExceptions) {
-            LogEventPatternConverter pc = ExtendedThrowablePatternConverter.newInstance(null);
+            final LogEventPatternConverter pc = ExtendedThrowablePatternConverter.newInstance(null);
             list.add(new PatternFormatter(pc, FormattingInfo.getDefault()));
         }
         return list;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/RootThrowablePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/RootThrowablePatternConverter.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/RootThrowablePatternConverter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/RootThrowablePatternConverter.java Thu Jan 10 20:23:34 2013
@@ -111,7 +111,7 @@ public final class RootThrowablePatternC
             if (lines != Integer.MAX_VALUE) {
                 final StringBuilder sb = new StringBuilder();
                 final String[] array = trace.split("\n");
-                int limit = lines > array.length ? array.length : lines;
+                final int limit = lines > array.length ? array.length : lines;
                 for (int i = 0; i < limit; ++i) {
                     sb.append(array[i]).append("\n");
                 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverter.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverter.java Thu Jan 10 20:23:34 2013
@@ -107,7 +107,7 @@ public class ThrowablePatternConverter e
             if (lines != Integer.MAX_VALUE) {
                 final StringBuilder sb = new StringBuilder();
                 final String[] array = w.toString().split("\n");
-                int limit = lines > array.length ? array.length : lines;
+                final int limit = lines > array.length ? array.length : lines;
                 for (int i = 0; i < limit; ++i) {
                     sb.append(array[i]).append("\n");
                 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java Thu Jan 10 20:23:34 2013
@@ -100,7 +100,7 @@ public class ClassLoaderContextSelector 
             if (securityManager != null) {
                 final Class clazz = securityManager.getCaller(fqcn);
                 if (clazz != null) {
-                    ClassLoader ldr = clazz.getClassLoader() != null ? clazz.getClassLoader() :
+                    final ClassLoader ldr = clazz.getClassLoader() != null ? clazz.getClassLoader() :
                         ClassLoader.getSystemClassLoader();
                     return locateContext(ldr, null);
                 }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SimpleSmtpServer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SimpleSmtpServer.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SimpleSmtpServer.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SimpleSmtpServer.java Thu Jan 10 20:23:34 2013
@@ -94,7 +94,7 @@ public class SimpleSmtpServer implements
                 Socket socket = null;
                 try {
                     socket = serverSocket.accept();
-                } catch (Exception e) {
+                } catch (final Exception e) {
                     if (socket != null) {
                         socket.close();
                     }
@@ -102,8 +102,8 @@ public class SimpleSmtpServer implements
                 }
 
                 // Get the input and output streams
-                BufferedReader input = new BufferedReader(new InputStreamReader(socket.getInputStream()));
-                PrintWriter out = new PrintWriter(socket.getOutputStream());
+                final BufferedReader input = new BufferedReader(new InputStreamReader(socket.getInputStream()));
+                final PrintWriter out = new PrintWriter(socket.getOutputStream());
 
                 synchronized (this) {
           /*
@@ -112,19 +112,19 @@ public class SimpleSmtpServer implements
            * For higher concurrency, we could just change handle to return void and update the list inside the method
            * to limit the duration that we hold the lock.
            */
-                    List msgs = handleTransaction(out, input);
+                    final List msgs = handleTransaction(out, input);
                     receivedMail.addAll(msgs);
                 }
                 socket.close();
             }
-        } catch (Exception e) {
+        } catch (final Exception e) {
             /** @todo Should throw an appropriate exception here. */
             e.printStackTrace();
         } finally {
             if (serverSocket != null) {
                 try {
                     serverSocket.close();
-                } catch (IOException e) {
+                } catch (final IOException e) {
                     e.printStackTrace();
                 }
             }
@@ -150,7 +150,7 @@ public class SimpleSmtpServer implements
         try {
             // Kick the server accept loop
             serverSocket.close();
-        } catch (IOException e) {
+        } catch (final IOException e) {
             // Ignore
         }
     }
@@ -166,36 +166,36 @@ public class SimpleSmtpServer implements
     private List handleTransaction(PrintWriter out, BufferedReader input) throws IOException {
         // Initialize the state machine
         SmtpState smtpState = SmtpState.CONNECT;
-        SmtpRequest smtpRequest = new SmtpRequest(SmtpActionType.CONNECT, "", smtpState);
+        final SmtpRequest smtpRequest = new SmtpRequest(SmtpActionType.CONNECT, "", smtpState);
 
         // Execute the connection request
-        SmtpResponse smtpResponse = smtpRequest.execute();
+        final SmtpResponse smtpResponse = smtpRequest.execute();
 
         // Send initial response
         sendResponse(out, smtpResponse);
         smtpState = smtpResponse.getNextState();
 
-        List msgList = new ArrayList();
+        final List msgList = new ArrayList();
         SmtpMessage msg = new SmtpMessage();
 
         while (smtpState != SmtpState.CONNECT) {
-            String line = input.readLine();
+            final String line = input.readLine();
 
             if (line == null) {
                 break;
             }
 
             // Create request from client input and current state
-            SmtpRequest request = SmtpRequest.createRequest(line, smtpState);
+            final SmtpRequest request = SmtpRequest.createRequest(line, smtpState);
             // Execute request and create response object
-            SmtpResponse response = request.execute();
+            final SmtpResponse response = request.execute();
             // Move to next internal state
             smtpState = response.getNextState();
             // Send reponse to client
             sendResponse(out, response);
 
             // Store input in message
-            String params = request.getParams();
+            final String params = request.getParams();
             msg.store(response, params);
 
             // If message reception is complete save it
@@ -216,8 +216,8 @@ public class SimpleSmtpServer implements
      */
     private static void sendResponse(PrintWriter out, SmtpResponse smtpResponse) {
         if (smtpResponse.getCode() > 0) {
-            int code = smtpResponse.getCode();
-            String message = smtpResponse.getMessage();
+            final int code = smtpResponse.getCode();
+            final String message = smtpResponse.getMessage();
             out.print(code + " " + message + "\r\n");
             out.flush();
         }
@@ -257,8 +257,8 @@ public class SimpleSmtpServer implements
      * @return a reference to the SMTP server
      */
     public static SimpleSmtpServer start(int port) {
-        SimpleSmtpServer server = new SimpleSmtpServer(port);
-        Thread t = new Thread(server);
+        final SimpleSmtpServer server = new SimpleSmtpServer(port);
+        final Thread t = new Thread(server);
 
 
         // Block until the server socket is created
@@ -266,7 +266,7 @@ public class SimpleSmtpServer implements
             t.start();
             try {
                 server.wait();
-            } catch (InterruptedException e) {
+            } catch (final InterruptedException e) {
                 // Ignore don't care.
             }
         }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpMessage.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpMessage.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpMessage.java Thu Jan 10 20:23:34 2013
@@ -53,10 +53,10 @@ public class SmtpMessage {
     public void store(SmtpResponse response, String params) {
         if (params != null) {
             if (SmtpState.DATA_HDR.equals(response.getNextState())) {
-                int headerNameEnd = params.indexOf(':');
+                final int headerNameEnd = params.indexOf(':');
                 if (headerNameEnd >= 0) {
-                    String name = params.substring(0, headerNameEnd).trim();
-                    String value = params.substring(headerNameEnd + 1).trim();
+                    final String name = params.substring(0, headerNameEnd).trim();
+                    final String value = params.substring(headerNameEnd + 1).trim();
                     addHeader(name, value);
                 }
             } else if (SmtpState.DATA_BODY == response.getNextState()) {
@@ -71,7 +71,7 @@ public class SmtpMessage {
      * @return an Iterator over the set of header names (String)
      */
     public Iterator getHeaderNames() {
-        Set nameSet = headers.keySet();
+        final Set nameSet = headers.keySet();
         return nameSet.iterator();
     }
 
@@ -82,7 +82,7 @@ public class SmtpMessage {
      * @return value(s) associated with the header name
      */
     public String[] getHeaderValues(String name) {
-        List values = (List) headers.get(name);
+        final List values = (List) headers.get(name);
         if (values == null) {
             return new String[0];
         } else {
@@ -97,11 +97,11 @@ public class SmtpMessage {
      * @return first value associated with the header name
      */
     public String getHeaderValue(String name) {
-        List values = (List) headers.get(name);
+        final List values = (List) headers.get(name);
         if (values == null) {
             return null;
         } else {
-            Iterator iterator = values.iterator();
+            final Iterator iterator = values.iterator();
             return (String) iterator.next();
         }
     }
@@ -137,12 +137,12 @@ public class SmtpMessage {
      */
     @Override
     public String toString() {
-        StringBuffer msg = new StringBuffer();
-        for (Iterator i = headers.keySet().iterator(); i.hasNext(); ) {
-            String name = (String) i.next();
-            List values = (List) headers.get(name);
-            for (Iterator j = values.iterator(); j.hasNext(); ) {
-                String value = (String) j.next();
+        final StringBuffer msg = new StringBuffer();
+        for (final Iterator i = headers.keySet().iterator(); i.hasNext(); ) {
+            final String name = (String) i.next();
+            final List values = (List) headers.get(name);
+            for (final Iterator j = values.iterator(); j.hasNext(); ) {
+                final String value = (String) j.next();
                 msg.append(name);
                 msg.append(": ");
                 msg.append(value);

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpRequest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpRequest.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpRequest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpRequest.java Thu Jan 10 20:23:34 2013
@@ -186,7 +186,7 @@ public class SmtpRequest {
                 }
             }
         } else {
-            String su = s.toUpperCase();
+            final String su = s.toUpperCase();
             if (su.startsWith("EHLO ") || su.startsWith("HELO")) {
                 action = SmtpActionType.EHLO;
                 params = s.substring(5);
@@ -215,7 +215,7 @@ public class SmtpRequest {
             }
         }
 
-        SmtpRequest req = new SmtpRequest(action, params, state);
+        final SmtpRequest req = new SmtpRequest(action, params, state);
         return req;
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LogEventTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LogEventTest.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LogEventTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LogEventTest.java Thu Jan 10 20:23:34 2013
@@ -40,8 +40,8 @@ public class LogEventTest {
     public void testSerialization() throws Exception {
         final LogEvent event1 = new Log4jLogEvent(this.getClass().getName(), null, "org.apache.logging.log4j.core.Logger",
             Level.INFO, new SimpleMessage("Hello, world!"), null);
-        Exception parent = new IllegalStateException("Test");
-        Throwable child = new LoggingException("This is a test", parent);
+        final Exception parent = new IllegalStateException("Test");
+        final Throwable child = new LoggingException("This is a test", parent);
         final LogEvent event2 = new Log4jLogEvent(this.getClass().getName(), null, "org.apache.logging.log4j.core.Logger",
             Level.INFO, new SimpleMessage("Hello, world!"), child);
 

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java Thu Jan 10 20:23:34 2013
@@ -186,7 +186,7 @@ public class LoggerTest {
         testLogger.debug("Hello, {}", "World");
         final List<String> msgs = host.getMessages();
         assertTrue("Incorrect number of events. Expected 1, actual " + msgs.size(), msgs.size() == 1);
-        String expected = NetUtils.getLocalHostname() + Constants.LINE_SEP;
+        final String expected = NetUtils.getLocalHostname() + Constants.LINE_SEP;
         assertTrue("Incorrect hostname - expected " + expected + " actual - " + msgs.get(0),
             msgs.get(0).endsWith(expected));
 
@@ -198,7 +198,7 @@ public class LoggerTest {
         testLogger.debug("This is a test", new Throwable("Testing"));
         final List<String> msgs = host.getMessages();
         assertTrue("Incorrect number of messages. Expected 1, actual " + msgs.size(), msgs.size() == 1);
-        String expected = "java.lang.Throwable: Testing";
+        final String expected = "java.lang.Throwable: Testing";
         assertTrue("Incorrect message data", msgs.get(0).contains(expected));
     }
 
@@ -209,7 +209,7 @@ public class LoggerTest {
         testLogger.debug("This is a test", new Throwable("Testing"));
         final List<String> msgs = noThrown.getMessages();
         assertTrue("Incorrect number of messages. Expected 1, actual " + msgs.size(), msgs.size() == 1);
-        String suppressed = "java.lang.Throwable: Testing";
+        final String suppressed = "java.lang.Throwable: Testing";
         assertTrue("Incorrect message data", !msgs.get(0).contains(suppressed));
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/AsynchAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/AsynchAppenderTest.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/AsynchAppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/AsynchAppenderTest.java Thu Jan 10 20:23:34 2013
@@ -89,14 +89,14 @@ public class AsynchAppenderTest {
     @Test
     public void testException() throws Exception {
         final Logger logger = LogManager.getLogger(AsynchAppender.class);
-        Exception parent = new IllegalStateException("Test");
-        Throwable child = new LoggingException("This is a test", parent);
+        final Exception parent = new IllegalStateException("Test");
+        final Throwable child = new LoggingException("This is a test", parent);
         logger.error("This is a test", child);
         Thread.sleep(100);
         final List<String> list = app.getMessages();
         assertNotNull("No events generated", list);
         assertTrue("Incorrect number of events. Expected 1, got " + list.size(), list.size() == 1);
-        String msg = list.get(0);
+        final String msg = list.get(0);
         assertTrue("No parent exception", msg.contains("java.lang.IllegalStateException"));
     }
 }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SMTPAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SMTPAppenderTest.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SMTPAppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SMTPAppenderTest.java Thu Jan 10 20:23:34 2013
@@ -53,7 +53,7 @@ public class SMTPAppenderTest {
 
         builder.setFrom(null);
         Address[] array = null;
-        Address addr = InternetAddress.getLocalAddress(null);
+        final Address addr = InternetAddress.getLocalAddress(null);
         if (addr != null) {
             array = new Address[] {addr};
         }
@@ -148,7 +148,7 @@ public class SMTPAppenderTest {
 
         server.stop();
         assertTrue(server.getReceivedEmailSize() == 1);
-        SmtpMessage email = (SmtpMessage) server.getReceivedEmail().next();
+        final SmtpMessage email = (SmtpMessage) server.getReceivedEmail().next();
 
         assertEquals("to@example.com", email.getHeaderValue("To"));
         assertEquals("cc@example.com", email.getHeaderValue("Cc"));
@@ -158,7 +158,7 @@ public class SMTPAppenderTest {
         assertEquals("replyTo@example.com", email.getHeaderValue("Reply-To"));
         assertEquals("Subject", email.getHeaderValue("Subject"));
 
-        String body = email.getBody();
+        final String body = email.getBody();
         assertFalse(body.contains("Debug message #1"));
         assertTrue(body.contains("Debug message #2"));
         assertTrue(body.contains("Debug message #3"));

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SocketAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SocketAppenderTest.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SocketAppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SocketAppenderTest.java Thu Jan 10 20:23:34 2013
@@ -105,8 +105,8 @@ public class SocketAppenderTest {
         root.setAdditive(false);
         root.setLevel(Level.DEBUG);
         root.debug("This is a test message");
-        Exception parent = new IllegalStateException("Test");
-        Throwable child = new LoggingException("This is a test");
+        final Exception parent = new IllegalStateException("Test");
+        final Throwable child = new LoggingException("This is a test");
         root.error("Throwing an exception", child);
         root.debug("This is another test message");
         Thread.sleep(250);

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java Thu Jan 10 20:23:34 2013
@@ -241,9 +241,9 @@ public class TestConfigurator {
 
     @Test
     public void testBadFileName() throws Exception {
-        StringBuilder dir = new StringBuilder("/VeryLongDirectoryName");
+        final StringBuilder dir = new StringBuilder("/VeryLongDirectoryName");
 
-        for (String element : CHARS) {
+        for (final String element : CHARS) {
             dir.append(element);
             dir.append(element.toUpperCase());
         }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/RFC5424LayoutTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/RFC5424LayoutTest.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/RFC5424LayoutTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/RFC5424LayoutTest.java Thu Jan 10 20:23:34 2013
@@ -72,7 +72,7 @@ public class RFC5424LayoutTest {
      */
     @Test
     public void testLayout() throws Exception {
-        for (Appender appender : root.getAppenders().values()) {
+        for (final Appender appender : root.getAppenders().values()) {
             root.removeAppender(appender);
         }
         // set up appender
@@ -136,7 +136,7 @@ public class RFC5424LayoutTest {
      */
     @Test
     public void testException() throws Exception {
-        for (Appender appender : root.getAppenders().values()) {
+        for (final Appender appender : root.getAppenders().values()) {
             root.removeAppender(appender);
         }
         // set up appender
@@ -156,7 +156,7 @@ public class RFC5424LayoutTest {
 
         try {
 
-            List<String> list = appender.getMessages();
+            final List<String> list = appender.getMessages();
 
             assertTrue("Not enough list entries", list.size() > 1);
             assertTrue("No Exception", list.get(1).contains("IllegalArgumentException"));

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/SerializedLayoutTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/SerializedLayoutTest.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/SerializedLayoutTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/SerializedLayoutTest.java Thu Jan 10 20:23:34 2013
@@ -100,8 +100,8 @@ public class SerializedLayoutTest {
 
         root.error("finished mdc pattern test", new NullPointerException("test"));
 
-        Exception parent = new IllegalStateException("Test");
-        Throwable child = new LoggingException("This is a test", parent);
+        final Exception parent = new IllegalStateException("Test");
+        final Throwable child = new LoggingException("This is a test", parent);
 
         root.error("Throwing an exception", child);
 

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/SyslogLayoutTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/SyslogLayoutTest.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/SyslogLayoutTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/SyslogLayoutTest.java Thu Jan 10 20:23:34 2013
@@ -72,7 +72,7 @@ public class SyslogLayoutTest {
      */
     @Test
     public void testLayout() throws Exception {
-        for (Appender appender : root.getAppenders().values()) {
+        for (final Appender appender : root.getAppenders().values()) {
             root.removeAppender(appender);
         }
         // set up appender

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/util/JunitTestRunnerFilter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/util/JunitTestRunnerFilter.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/util/JunitTestRunnerFilter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/util/JunitTestRunnerFilter.java Thu Jan 10 20:23:34 2013
@@ -47,7 +47,7 @@ public class JunitTestRunnerFilter imple
         return "\tat java.lang.reflect.Method.invoke(X)\n" + in;
     }
 
-    for (String pattern : patterns) {
+    for (final String pattern : patterns) {
         if(util.match(pattern, in)) {
             return null;
         }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/util/Transformer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/util/Transformer.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/util/Transformer.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/util/Transformer.java Thu Jan 10 20:23:34 2013
@@ -40,7 +40,7 @@ public class Transformer {
       // Initialization of input and output omitted
       while ((line = input.readLine()) != null) {
         // apply all filters
-        for (Filter filter : filters) {
+        for (final Filter filter : filters) {
           line = filter.filter(line);
         }
         if (line != null) {

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/FailOnceAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/FailOnceAppender.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/FailOnceAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/FailOnceAppender.java Thu Jan 10 20:23:34 2013
@@ -50,7 +50,7 @@ public class FailOnceAppender extends Ab
     }
 
     public List<LogEvent> getEvents() {
-        List<LogEvent> list = new ArrayList<LogEvent>(events);
+        final List<LogEvent> list = new ArrayList<LogEvent>(events);
         events.clear();
         return list;
     }

Modified: logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java (original)
+++ logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java Thu Jan 10 20:23:34 2013
@@ -75,9 +75,9 @@ public class SLF4JLogger extends Abstrac
         if (marker == null) {
             return null;
         }
-        Marker parent = marker.getParent();
-        org.slf4j.Marker parentMarker = parent == null ? null : getMarker(parent);
-        org.slf4j.Marker slf4jMarker = MarkerFactory.getMarker(marker.getName());
+        final Marker parent = marker.getParent();
+        final org.slf4j.Marker parentMarker = parent == null ? null : getMarker(parent);
+        final org.slf4j.Marker slf4jMarker = MarkerFactory.getMarker(marker.getName());
         if (parentMarker != null && !slf4jMarker.contains(parentMarker)) {
             slf4jMarker.add(parentMarker);
         }
@@ -127,7 +127,7 @@ public class SLF4JLogger extends Abstrac
     }
 
     private boolean isEnabledFor(Level level, Marker marker) {
-        org.slf4j.Marker slf4jMarker = getMarker(marker);
+        final org.slf4j.Marker slf4jMarker = getMarker(marker);
         switch (level) {
             case DEBUG :
                 return logger.isDebugEnabled(slf4jMarker);

Modified: logging/log4j/log4j2/trunk/log4j-to-slf4j/src/test/java/org/apache/logging/slf4j/LoggerTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-to-slf4j/src/test/java/org/apache/logging/slf4j/LoggerTest.java?rev=1431609&r1=1431608&r2=1431609&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-to-slf4j/src/test/java/org/apache/logging/slf4j/LoggerTest.java (original)
+++ logging/log4j/log4j2/trunk/log4j-to-slf4j/src/test/java/org/apache/logging/slf4j/LoggerTest.java Thu Jan 10 20:23:34 2013
@@ -67,7 +67,7 @@ public class LoggerTest {
     }
 
     private static void configure(String file) throws JoranException {
-        JoranConfigurator jc = new JoranConfigurator();
+        final JoranConfigurator jc = new JoranConfigurator();
         jc.setContext(context);
         jc.doConfigure(file);
     }
@@ -157,7 +157,7 @@ public class LoggerTest {
         logger.debug("This is a test", new Throwable("Testing"));
         final List<String> msgs = list.strList;
         assertTrue("Incorrect number of messages. Expected 1, actual " + msgs.size(), msgs.size() == 1);
-        String expected = "java.lang.Throwable: Testing";
+        final String expected = "java.lang.Throwable: Testing";
         assertTrue("Incorrect message data", msgs.get(0).contains(expected));
     }
     @Test



Mime
View raw message