logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1419697 [4/17] - 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/...
Date Mon, 10 Dec 2012 19:37:03 GMT
Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/MapMessageTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/MapMessageTest.java?rev=1419697&r1=1419696&r2=1419697&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/MapMessageTest.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/MapMessageTest.java Mon Dec 10 19:36:06 2012
@@ -27,23 +27,23 @@ public class MapMessageTest {
 
     @Test
     public void testMap() {
-        String testMsg = "Test message {}";
-        MapMessage msg = new MapMessage();
+        final String testMsg = "Test message {}";
+        final MapMessage msg = new MapMessage();
         msg.put("message", testMsg);
         msg.put("project", "Log4j");
-        String result = msg.getFormattedMessage();
-        String expected = "message=\"Test message {}\" project=\"Log4j\"";
+        final String result = msg.getFormattedMessage();
+        final String expected = "message=\"Test message {}\" project=\"Log4j\"";
         assertEquals(expected, result);
     }
 
     @Test
     public void testXML() {
-        String testMsg = "Test message {}";
-        MapMessage msg = new MapMessage();
+        final String testMsg = "Test message {}";
+        final MapMessage msg = new MapMessage();
         msg.put("message", testMsg);
         msg.put("project", "Log4j");
-        String result = msg.getFormattedMessage(new String[]{"XML"});
-        String expected = "<Map>\n  <Entry key=message>Test message {}</Entry>\n" +
+        final String result = msg.getFormattedMessage(new String[]{"XML"});
+        final String expected = "<Map>\n  <Entry key=message>Test message {}</Entry>\n" +
             "  <Entry key=project>Log4j</Entry>\n" +
             "</Map>";
         assertEquals(expected, result);
@@ -51,23 +51,23 @@ public class MapMessageTest {
 
     @Test
     public void testJSON() {
-        String testMsg = "Test message {}";
-        MapMessage msg = new MapMessage();
+        final String testMsg = "Test message {}";
+        final MapMessage msg = new MapMessage();
         msg.put("message", testMsg);
         msg.put("project", "Log4j");
-        String result = msg.getFormattedMessage(new String[]{"JSON"});
-        String expected = "{\"message\":\"Test message {}\", \"project\":\"Log4j\"}";
+        final String result = msg.getFormattedMessage(new String[]{"JSON"});
+        final String expected = "{\"message\":\"Test message {}\", \"project\":\"Log4j\"}";
         assertEquals(expected, result);
     }
 
     @Test
     public void testJava() {
-        String testMsg = "Test message {}";
-        MapMessage msg = new MapMessage();
+        final String testMsg = "Test message {}";
+        final MapMessage msg = new MapMessage();
         msg.put("message", testMsg);
         msg.put("project", "Log4j");
-        String result = msg.getFormattedMessage(new String[]{"Java"});
-        String expected = "{message=\"Test message {}\", project=\"Log4j\"}";
+        final String result = msg.getFormattedMessage(new String[]{"Java"});
+        final String expected = "{message=\"Test message {}\", project=\"Log4j\"}";
         assertEquals(expected, result);
     }
 }

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/ObjectMessageTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/ObjectMessageTest.java?rev=1419697&r1=1419696&r2=1419697&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/ObjectMessageTest.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/ObjectMessageTest.java Mon Dec 10 19:36:06 2012
@@ -27,16 +27,16 @@ public class ObjectMessageTest {
 
     @Test
     public void testNull() {
-        ObjectMessage msg = new ObjectMessage(null);
-        String result = msg.getFormattedMessage();
+        final ObjectMessage msg = new ObjectMessage(null);
+        final String result = msg.getFormattedMessage();
         assertEquals("null", result);
     }
 
     @Test
     public void testNotNull() {
-        String testMsg = "Test message {}";
-        ObjectMessage msg = new ObjectMessage(testMsg);
-        String result = msg.getFormattedMessage();
+        final String testMsg = "Test message {}";
+        final ObjectMessage msg = new ObjectMessage(testMsg);
+        final String result = msg.getFormattedMessage();
         assertEquals(testMsg, result);
     }
 }

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/ParameterizedMessageTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/ParameterizedMessageTest.java?rev=1419697&r1=1419696&r2=1419697&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/ParameterizedMessageTest.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/ParameterizedMessageTest.java Mon Dec 10 19:36:06 2012
@@ -27,11 +27,11 @@ public class ParameterizedMessageTest {
 
     @Test
     public void testNoArgs() {
-        String testMsg = "Test message {}";
+        final String testMsg = "Test message {}";
         ParameterizedMessage msg = new ParameterizedMessage(testMsg, null);
         String result = msg.getFormattedMessage();
         assertEquals(testMsg, result);
-        Object[] array = null;
+        final Object[] array = null;
         msg = new ParameterizedMessage(testMsg, array, null);
         result = msg.getFormattedMessage();
         assertEquals(testMsg, result);

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=1419697&r1=1419696&r2=1419697&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 Mon Dec 10 19:36:06 2012
@@ -47,12 +47,12 @@ public class StringFormattedMessageTest 
 
     @Test
     public void testNoArgs() {
-        String testMsg = "Test message %1s";
+        final String testMsg = "Test message %1s";
         StringFormattedMessage msg = new StringFormattedMessage(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 StringFormattedMessage(testMsg, array, null);
         result = msg.getFormattedMessage();
         assertEquals(expected, result);
@@ -60,20 +60,20 @@ public class StringFormattedMessageTest 
 
     @Test
     public void testOneArg() {
-        String testMsg = "Test message %1s";
-        StringFormattedMessage msg = new StringFormattedMessage(testMsg, "Apache");
-        String result = msg.getFormattedMessage();
-        String expected = "Test message Apache";
+        final String testMsg = "Test message %1s";
+        final StringFormattedMessage msg = new StringFormattedMessage(testMsg, "Apache");
+        final String result = msg.getFormattedMessage();
+        final String expected = "Test message Apache";
         assertEquals(expected, result);
     }
 
     @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();
@@ -83,11 +83,11 @@ public class StringFormattedMessageTest 
 
     @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();

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/StructuredDataMessageTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/StructuredDataMessageTest.java?rev=1419697&r1=1419696&r2=1419697&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/StructuredDataMessageTest.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/StructuredDataMessageTest.java Mon Dec 10 19:36:06 2012
@@ -27,20 +27,20 @@ public class StructuredDataMessageTest {
 
     @Test
     public void testMsg() {
-        String testMsg = "Test message {}";
-        StructuredDataMessage msg = new StructuredDataMessage("MsgId@12345", testMsg, "Alert");
+        final String testMsg = "Test message {}";
+        final StructuredDataMessage msg = new StructuredDataMessage("MsgId@12345", testMsg, "Alert");
         msg.put("message", testMsg);
         msg.put("project", "Log4j");
         msg.put("memo", "This is a very long test memo to prevent regression of LOG4J2-114");
-        String result = msg.getFormattedMessage();
-        String expected = "Alert [MsgId@12345 memo=\"This is a very long test memo to prevent regression of LOG4J2-114\" message=\"Test message {}\" project=\"Log4j\"] Test message {}";
+        final String result = msg.getFormattedMessage();
+        final String expected = "Alert [MsgId@12345 memo=\"This is a very long test memo to prevent regression of LOG4J2-114\" message=\"Test message {}\" project=\"Log4j\"] Test message {}";
         assertEquals(expected, result);
     }
 
     @Test(expected=IllegalArgumentException.class)
     public void testMsgWithKeyTooLong() {
-        String testMsg = "Test message {}";
-        StructuredDataMessage msg = new StructuredDataMessage("MsgId@12345", testMsg, "Alert");
+        final String testMsg = "Test message {}";
+        final StructuredDataMessage msg = new StructuredDataMessage("MsgId@12345", testMsg, "Alert");
         msg.put("This is a very long key that will violate the key length validation", "Testing");
     }
 }

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/ThreadDumpMessageTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/ThreadDumpMessageTest.java?rev=1419697&r1=1419696&r2=1419697&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/ThreadDumpMessageTest.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/message/ThreadDumpMessageTest.java Mon Dec 10 19:36:06 2012
@@ -30,9 +30,9 @@ public class ThreadDumpMessageTest {
 
     @Test
     public void testMessage() {
-        ThreadDumpMessage msg = new ThreadDumpMessage("Testing");
+        final ThreadDumpMessage msg = new ThreadDumpMessage("Testing");
 
-        String message = msg.getFormattedMessage();
+        final String message = msg.getFormattedMessage();
         //System.out.print(message);
         assertTrue("No header", message.contains("Testing"));
         assertTrue("No RUNNABLE", message.contains("RUNNABLE"));
@@ -42,13 +42,13 @@ public class ThreadDumpMessageTest {
 
     @Test
     public void testMessageWithLocks() throws Exception {
-        ReentrantLock lock = new ReentrantLock();
+        final ReentrantLock lock = new ReentrantLock();
         lock.lock();
-        Thread thread1 = new Thread1(lock);
+        final Thread thread1 = new Thread1(lock);
         thread1.start();
         ThreadDumpMessage msg;
         synchronized(this) {
-            Thread thread2 = new Thread2(this);
+            final Thread thread2 = new Thread2(this);
             thread2.start();
             try {
                 Thread.sleep(200);
@@ -58,7 +58,7 @@ public class ThreadDumpMessageTest {
             }
         }
 
-        String message = msg.getFormattedMessage();
+        final String message = msg.getFormattedMessage();
         //System.out.print(message);
         assertTrue("No header", message.contains("Testing"));
         assertTrue("No RUNNABLE", message.contains("RUNNABLE"));
@@ -69,15 +69,15 @@ public class ThreadDumpMessageTest {
 
     @Test
     public void testToString() {
-        ThreadDumpMessage msg = new ThreadDumpMessage("Test");
-        String expected = "ThreadDumpMessage[Title=\"Test\"]";
+        final ThreadDumpMessage msg = new ThreadDumpMessage("Test");
+        final String expected = "ThreadDumpMessage[Title=\"Test\"]";
         assertEquals(expected, msg.toString());
     }
 
     private class Thread1 extends Thread {
-        private ReentrantLock lock;
+        private final ReentrantLock lock;
 
-        public Thread1(ReentrantLock lock) {
+        public Thread1(final ReentrantLock lock) {
             this.lock = lock;
         }
 
@@ -89,9 +89,9 @@ public class ThreadDumpMessageTest {
     }
 
     private class Thread2 extends Thread {
-        private Object obj;
+        private final Object obj;
 
-        public Thread2(Object obj) {
+        public Thread2(final Object obj) {
             this.obj = obj;
         }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/AbstractServer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/AbstractServer.java?rev=1419697&r1=1419696&r2=1419697&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/AbstractServer.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/AbstractServer.java Mon Dec 10 19:36:06 2012
@@ -29,8 +29,8 @@ public class AbstractServer {
         context = (LoggerContext) LogManager.getContext(false);
     }
 
-    protected void log(LogEvent event) {
-        Logger logger = context.getLogger(event.getLoggerName());
+    protected void log(final LogEvent event) {
+        final Logger logger = context.getLogger(event.getLoggerName());
         if (logger.config.filter(event.getLevel(), event.getMarker(), event.getMessage(), event.getThrown())) {
             logger.config.logEvent(event);
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Filter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Filter.java?rev=1419697&r1=1419696&r2=1419697&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Filter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Filter.java Mon Dec 10 19:36:06 2012
@@ -58,7 +58,7 @@ public interface Filter {
          * @param name The Result enum name, case-insensitive. If null, returns, null
          * @return a Result enum value or null if name is null
          */
-        public static Result toResult(String name) {
+        public static Result toResult(final String name) {
             return toResult(name, null);
         }
 
@@ -69,7 +69,7 @@ public interface Filter {
          * @param defaultResult the Result to return if name is null
          * @return a Result enum value or null if name is null
          */
-        public static Result toResult(String name, Result defaultResult) {
+        public static Result toResult(final String name, final Result defaultResult) {
             return EnglishEnums.valueOf(Result.class, name, defaultResult);
         }
 }

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=1419697&r1=1419696&r2=1419697&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 Mon Dec 10 19:36:06 2012
@@ -52,7 +52,7 @@ public class Logger extends AbstractLogg
      * @param messageFactory The message factory.
      * @param name The name of the Logger.
      */
-    protected Logger(LoggerContext context, String name, MessageFactory messageFactory) {
+    protected Logger(final LoggerContext context, final String name, final MessageFactory messageFactory) {
         super(name, messageFactory);
         this.context = context;
         config = new PrivateConfig(context.getConfiguration(), this);
@@ -63,7 +63,7 @@ public class Logger extends AbstractLogg
      * @return The parent Logger.
      */
     public Logger getParent() {
-        LoggerConfig lc = config.loggerConfig.getParent();
+        final LoggerConfig lc = config.loggerConfig.getParent();
         if (lc == null) {
             return null;
         }
@@ -85,7 +85,7 @@ public class Logger extends AbstractLogg
      * This method is not exposed through the public API and is provided primarily for unit testing.
      * @param level The Level to use on this Logger.
      */
-    public synchronized void setLevel(Level level) {
+    public synchronized void setLevel(final Level level) {
         if (level != null) {
             config = new PrivateConfig(config, level);
         }
@@ -100,7 +100,7 @@ public class Logger extends AbstractLogg
     }
 
     @Override
-    public void log(Marker marker, String fqcn, Level level, Message data, Throwable t) {
+    public void log(final Marker marker, final String fqcn, final Level level, Message data, final Throwable t) {
         if (data == null) {
             data = new SimpleMessage("");
         }
@@ -109,27 +109,27 @@ public class Logger extends AbstractLogg
     }
 
     @Override
-    public boolean isEnabled(Level level, Marker marker, String msg) {
+    public boolean isEnabled(final Level level, final Marker marker, final String msg) {
         return config.filter(level, marker, msg);
     }
 
     @Override
-    public boolean isEnabled(Level level, Marker marker, String msg, Throwable t) {
+    public boolean isEnabled(final Level level, final Marker marker, final String msg, final Throwable t) {
         return config.filter(level, marker, msg, t);
     }
 
     @Override
-    public boolean isEnabled(Level level, Marker marker, String msg, Object... p1) {
+    public boolean isEnabled(final Level level, final Marker marker, final String msg, final Object... p1) {
         return config.filter(level, marker, msg, p1);
     }
 
     @Override
-    public boolean isEnabled(Level level, Marker marker, Object msg, Throwable t) {
+    public boolean isEnabled(final Level level, final Marker marker, final Object msg, final Throwable t) {
         return config.filter(level, marker, msg, t);
     }
 
     @Override
-    public boolean isEnabled(Level level, Marker marker, Message msg, Throwable t) {
+    public boolean isEnabled(final Level level, final Marker marker, final Message msg, final Throwable t) {
         return config.filter(level, marker, msg, t);
     }
 
@@ -137,7 +137,7 @@ public class Logger extends AbstractLogg
      * This method is not exposed through the public API and is used primarily for unit testing.
      * @param appender The Appender to add to the Logger.
      */
-    public void addAppender(Appender appender) {
+    public void addAppender(final Appender appender) {
         config.config.addLoggerAppender(this, appender);
     }
 
@@ -145,7 +145,7 @@ public class Logger extends AbstractLogg
      * This method is not exposed through the public API and is used primarily for unit testing.
      * @param appender The Appender to remove from the Logger.
      */
-    public void removeAppender(Appender appender) {
+    public void removeAppender(final Appender appender) {
         config.loggerConfig.removeAppender(appender.getName());
     }
 
@@ -162,13 +162,13 @@ public class Logger extends AbstractLogg
      * @return An Iterator over all the Filters associated with the Logger.
      */
     public Iterator<Filter> getFilters() {
-        Filter filter = config.loggerConfig.getFilter();
+        final Filter filter = config.loggerConfig.getFilter();
         if (filter == null) {
             return new ArrayList<Filter>().iterator();
         } else if (filter instanceof CompositeFilter) {
             return ((CompositeFilter) filter).iterator();
         } else {
-            List<Filter> filters = new ArrayList<Filter>();
+            final List<Filter> filters = new ArrayList<Filter>();
             filters.add(filter);
             return filters.iterator();
         }
@@ -179,7 +179,7 @@ public class Logger extends AbstractLogg
      * @return The number of Filters associated with the Logger.
      */
     public int filterCount() {
-        Filter filter = config.loggerConfig.getFilter();
+        final Filter filter = config.loggerConfig.getFilter();
         if (filter == null) {
             return 0;
         } else if (filter instanceof CompositeFilter) {
@@ -192,7 +192,7 @@ public class Logger extends AbstractLogg
      * This method is not exposed through the public API and is used primarily for unit testing.
      * @param filter The Filter to add.
      */
-    public void addFilter(Filter filter) {
+    public void addFilter(final Filter filter) {
         config.config.addLoggerFilter(this, filter);
     }
 
@@ -210,7 +210,7 @@ public class Logger extends AbstractLogg
      * compatibility bridge.
      * @param additive Boolean value to indicate whether the Logger is additive or not.
      */
-    public void setAdditive(boolean additive) {
+    public void setAdditive(final boolean additive) {
         config.config.setLoggerAdditive(this, additive);
     }
 
@@ -226,7 +226,7 @@ public class Logger extends AbstractLogg
      *
      * @param config The new Configuration.
      */
-    void updateConfiguration(Configuration config) {
+    void updateConfiguration(final Configuration config) {
         this.config = new PrivateConfig(config, this);
     }
 
@@ -240,7 +240,7 @@ public class Logger extends AbstractLogg
         private final int intLevel;
         private final Logger logger;
 
-        public PrivateConfig(Configuration config, Logger logger) {
+        public PrivateConfig(final Configuration config, final Logger logger) {
             this.config = config;
             this.loggerConfig = config.getLoggerConfig(getName());
             this.level = this.loggerConfig.getLevel();
@@ -248,7 +248,7 @@ public class Logger extends AbstractLogg
             this.logger = logger;
         }
 
-        public PrivateConfig(PrivateConfig pc, Level level) {
+        public PrivateConfig(final PrivateConfig pc, final Level level) {
             this.config = pc.config;
             this.loggerConfig = pc.loggerConfig;
             this.level = level;
@@ -256,7 +256,7 @@ public class Logger extends AbstractLogg
             this.logger = pc.logger;
         }
 
-        public PrivateConfig(PrivateConfig pc, LoggerConfig lc) {
+        public PrivateConfig(final PrivateConfig pc, final LoggerConfig lc) {
             this.config = pc.config;
             this.loggerConfig = lc;
             this.level = lc.getLevel();
@@ -264,16 +264,16 @@ public class Logger extends AbstractLogg
             this.logger = pc.logger;
         }
 
-        protected void logEvent(LogEvent event) {
+        protected void logEvent(final LogEvent event) {
             config.getConfigurationMonitor().checkConfiguration();
             loggerConfig.log(event);
         }
 
-        boolean filter(Level level, Marker marker, String msg) {
+        boolean filter(final Level level, final Marker marker, final String msg) {
             config.getConfigurationMonitor().checkConfiguration();
-            Filter filter = config.getFilter();
+            final Filter filter = config.getFilter();
             if (filter != null) {
-                Filter.Result r = filter.filter(logger, level, marker, msg);
+                final Filter.Result r = filter.filter(logger, level, marker, msg);
                 if (r != Filter.Result.NEUTRAL) {
                     return r == Filter.Result.ACCEPT;
                 }
@@ -282,11 +282,11 @@ public class Logger extends AbstractLogg
             return intLevel >= level.intLevel();
         }
 
-        boolean filter(Level level, Marker marker, String msg, Throwable t) {
+        boolean filter(final Level level, final Marker marker, final String msg, final Throwable t) {
             config.getConfigurationMonitor().checkConfiguration();
-            Filter filter = config.getFilter();
+            final Filter filter = config.getFilter();
             if (filter != null) {
-                Filter.Result r = filter.filter(logger, level, marker, msg, t);
+                final Filter.Result r = filter.filter(logger, level, marker, msg, t);
                 if (r != Filter.Result.NEUTRAL) {
                     return r == Filter.Result.ACCEPT;
                 }
@@ -295,11 +295,11 @@ public class Logger extends AbstractLogg
             return intLevel >= level.intLevel();
         }
 
-        boolean filter(Level level, Marker marker, String msg, Object... p1) {
+        boolean filter(final Level level, final Marker marker, final String msg, final Object... p1) {
             config.getConfigurationMonitor().checkConfiguration();
-            Filter filter = config.getFilter();
+            final Filter filter = config.getFilter();
             if (filter != null) {
-                Filter.Result r = filter.filter(logger, level, marker, msg, p1);
+                final Filter.Result r = filter.filter(logger, level, marker, msg, p1);
                 if (r != Filter.Result.NEUTRAL) {
                     return r == Filter.Result.ACCEPT;
                 }
@@ -308,11 +308,11 @@ public class Logger extends AbstractLogg
             return intLevel >= level.intLevel();
         }
 
-        boolean filter(Level level, Marker marker, Object msg, Throwable t) {
+        boolean filter(final Level level, final Marker marker, final Object msg, final Throwable t) {
             config.getConfigurationMonitor().checkConfiguration();
-            Filter filter = config.getFilter();
+            final Filter filter = config.getFilter();
             if (filter != null) {
-                Filter.Result r = filter.filter(logger, level, marker, msg, t);
+                final Filter.Result r = filter.filter(logger, level, marker, msg, t);
                 if (r != Filter.Result.NEUTRAL) {
                     return r == Filter.Result.ACCEPT;
                 }
@@ -321,11 +321,11 @@ public class Logger extends AbstractLogg
             return intLevel >= level.intLevel();
         }
 
-        boolean filter(Level level, Marker marker, Message msg, Throwable t) {
+        boolean filter(final Level level, final Marker marker, final Message msg, final Throwable t) {
             config.getConfigurationMonitor().checkConfiguration();
-            Filter filter = config.getFilter();
+            final Filter filter = config.getFilter();
             if (filter != null) {
-                Filter.Result r = filter.filter(logger, level, marker, msg, t);
+                final Filter.Result r = filter.filter(logger, level, marker, msg, t);
                 if (r != Filter.Result.NEUTRAL) {
                     return r == Filter.Result.ACCEPT;
                 }

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=1419697&r1=1419696&r2=1419697&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 Mon Dec 10 19:36:06 2012
@@ -80,7 +80,7 @@ public class LoggerContext implements or
      * Constructor taking only a name.
      * @param name The context name.
      */
-    public LoggerContext(String name) {
+    public LoggerContext(final String name) {
         this(name, null, (URI) null);
     }
 
@@ -89,7 +89,7 @@ public class LoggerContext implements or
      * @param name The context name.
      * @param externalContext The external context.
      */
-    public LoggerContext(String name, Object externalContext) {
+    public LoggerContext(final String name, final Object externalContext) {
         this(name, externalContext, (URI) null);
     }
 
@@ -99,7 +99,7 @@ public class LoggerContext implements or
      * @param externalContext The external context.
      * @param configLocn The location of the configuration as a URI.
      */
-    public LoggerContext(String name, Object externalContext, URI configLocn) {
+    public LoggerContext(final String name, final Object externalContext, final URI configLocn) {
         this.name = name;
         this.externalContext = externalContext;
         this.configLocation = configLocn;
@@ -112,14 +112,14 @@ public class LoggerContext implements or
      * @param externalContext The external context.
      * @param configLocn The configuration location.
      */
-    public LoggerContext(String name, Object externalContext, String configLocn) {
+    public LoggerContext(final String name, final Object externalContext, final String configLocn) {
         this.name = name;
         this.externalContext = externalContext;
         if (configLocn != null) {
             URI uri;
             try {
                 uri = new File(configLocn).toURI();
-            } catch (Exception ex) {
+            } catch (final Exception ex) {
                 uri = null;
             }
             configLocation = uri;
@@ -176,7 +176,7 @@ public class LoggerContext implements or
      * Set the external context.
      * @param context The external context.
      */
-    public void setExternalContext(Object context) {
+    public void setExternalContext(final Object context) {
         this.externalContext = context;
     }
 
@@ -193,7 +193,7 @@ public class LoggerContext implements or
      * @param name The name of the Logger to return.
      * @return The Logger.
      */
-    public Logger getLogger(String name) {
+    public Logger getLogger(final String name) {
         return getLogger(name, null);
     }
 
@@ -203,7 +203,7 @@ public class LoggerContext implements or
      * @param messageFactory The message factory is used only when creating a logger, subsequent use does not change the logger but will log a warning if mismatched.
      * @return The Logger.
      */
-    public Logger getLogger(String name, MessageFactory messageFactory) {
+    public Logger getLogger(final String name, final MessageFactory messageFactory) {
         Logger logger = loggers.get(name);
         if (logger != null) {
             AbstractLogger.checkMessageFactory(logger, messageFactory);
@@ -211,7 +211,7 @@ public class LoggerContext implements or
         }
 
         logger = newInstance(this, name, messageFactory);
-        Logger prev = loggers.putIfAbsent(name, logger);
+        final Logger prev = loggers.putIfAbsent(name, logger);
         return prev == null ? logger : prev;
     }
 
@@ -220,7 +220,7 @@ public class LoggerContext implements or
      * @param name The Logger name to search for.
      * @return True if the Logger exists, false otherwise.
      */
-    public boolean hasLogger(String name) {
+    public boolean hasLogger(final String name) {
         return loggers.containsKey(name);
     }
 
@@ -237,7 +237,7 @@ public class LoggerContext implements or
      * when a reconfigure occurs.
      * @param filter The Filter to add.
      */
-    public void addFilter(Filter filter) {
+    public void addFilter(final Filter filter) {
         config.addFilter(filter);
     }
 
@@ -245,7 +245,7 @@ public class LoggerContext implements or
      * Removes a Filter from the current Configuration.
      * @param filter The Filter to remove.
      */
-    public void removeFiler(Filter filter) {
+    public void removeFiler(final Filter filter) {
         config.removeFilter(filter);
     }
 
@@ -254,11 +254,11 @@ public class LoggerContext implements or
      * @param config The new Configuration.
      * @return The previous Configuration.
      */
-    public synchronized Configuration setConfiguration(Configuration config) {
+    public synchronized Configuration setConfiguration(final Configuration config) {
         if (config == null) {
             throw new NullPointerException("No Configuration was provided");
         }
-        Configuration prev = this.config;
+        final Configuration prev = this.config;
         config.addListener(this);
         config.start();
         this.config = config;
@@ -275,7 +275,7 @@ public class LoggerContext implements or
      */
     public synchronized void reconfigure() {
         logger.debug("Reconfiguration started for context " + name);
-        Configuration instance = ConfigurationFactory.getInstance().getConfiguration(name, configLocation);
+        final Configuration instance = ConfigurationFactory.getInstance().getConfiguration(name, configLocation);
         setConfiguration(instance);
         /*instance.start();
         Configuration old = setConfiguration(instance);
@@ -297,8 +297,8 @@ public class LoggerContext implements or
      * Cause all Logger to be updated against the specified Configuration.
      * @param config The Configuration.
      */
-    public void updateLoggers(Configuration config) {
-        for (Logger logger : loggers.values()) {
+    public void updateLoggers(final Configuration config) {
+        for (final Logger logger : loggers.values()) {
             logger.updateConfiguration(config);
         }
     }
@@ -307,9 +307,9 @@ public class LoggerContext implements or
      * Cause a reconfiguration to take place when the underlying configuration file changes.
      * @param reconfigurable The Configuration that can be reconfigured.
      */
-    public synchronized void onChange(Reconfigurable reconfigurable) {
+    public synchronized void onChange(final Reconfigurable reconfigurable) {
         logger.debug("Reconfiguration started for context " + name);
-        Configuration config = reconfigurable.reconfigure();
+        final Configuration config = reconfigurable.reconfigure();
         if (config != null) {
             setConfiguration(config);
             logger.debug("Reconfiguration completed");
@@ -319,7 +319,7 @@ public class LoggerContext implements or
     }
 
 
-    private Logger newInstance(LoggerContext ctx, String name, MessageFactory messageFactory) {
+    private Logger newInstance(final LoggerContext ctx, final String name, final MessageFactory messageFactory) {
         return new Logger(ctx, name, messageFactory);
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractAppender.java?rev=1419697&r1=1419696&r2=1419697&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractAppender.java Mon Dec 10 19:36:06 2012
@@ -57,7 +57,7 @@ public abstract class AbstractAppender<T
      * @param filter The Filter to associate with the Appender.
      * @param layout The layout to use to format the event.
      */
-    protected AbstractAppender(String name, Filter filter, Layout<T> layout) {
+    protected AbstractAppender(final String name, final Filter filter, final Layout<T> layout) {
         this(name, filter, layout, true);
     }
 
@@ -69,7 +69,7 @@ public abstract class AbstractAppender<T
      * @param handleException If true, exceptions will be logged and suppressed. If false errors will be
      * logged and then passed to the application.
      */
-    protected AbstractAppender(String name, Filter filter, Layout<T> layout, boolean handleException) {
+    protected AbstractAppender(final String name, final Filter filter, final Layout<T> layout, final boolean handleException) {
         super(filter);
         this.name = name;
         this.layout = layout;
@@ -88,7 +88,7 @@ public abstract class AbstractAppender<T
      * The handler must be set before the appender is started.
      * @param handler The ErrorHandler to use.
      */
-    public void setHandler(ErrorHandler handler) {
+    public void setHandler(final ErrorHandler handler) {
         if (handler == null) {
             LOGGER.error("The handler cannot be set to null");
         }
@@ -164,7 +164,7 @@ public abstract class AbstractAppender<T
      * Handle an error with a message.
      * @param msg The message.
      */
-    public void error(String msg) {
+    public void error(final String msg) {
         handler.error(msg);
     }
 
@@ -173,7 +173,7 @@ public abstract class AbstractAppender<T
      * @param msg The message.
      * @param t The Throwable.
      */
-    public void error(String msg, Throwable t) {
+    public void error(final String msg, final Throwable t) {
         handler.error(msg, t);
     }
 
@@ -183,7 +183,7 @@ public abstract class AbstractAppender<T
      * @param event The LogEvent.
      * @param t The Throwable.
      */
-    public void error(String msg, LogEvent event, Throwable t) {
+    public void error(final String msg, final LogEvent event, final Throwable t) {
         handler.error(msg, event, t);
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractManager.java?rev=1419697&r1=1419696&r2=1419697&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractManager.java Mon Dec 10 19:36:06 2012
@@ -47,7 +47,7 @@ public abstract class AbstractManager {
 
     private final String name;
 
-    protected AbstractManager(String name) {
+    protected AbstractManager(final String name) {
         this.name = name;
         LOGGER.debug("Starting {} {}", this.getClass().getSimpleName(), name);
     }
@@ -60,7 +60,7 @@ public abstract class AbstractManager {
      * @param <M> The Type of the Manager to be created.
      * @return A Manager with the specified name and type.
      */
-    public static <M extends AbstractManager, T> M getManager(String name, ManagerFactory<M, T> factory, T data) {
+    public static <M extends AbstractManager, T> M getManager(final String name, final ManagerFactory<M, T> factory, final T data) {
         lock.lock();
         try {
             M manager = (M) map.get(name);
@@ -83,7 +83,7 @@ public abstract class AbstractManager {
      * @param name The name of the Manager.
      * @return True if the Manager exists, false otherwise.
      */
-    public static boolean hasManager(String name) {
+    public static boolean hasManager(final String name) {
         lock.lock();
         try {
             return map.containsKey(name);

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=1419697&r1=1419696&r2=1419697&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 Mon Dec 10 19:36:06 2012
@@ -54,8 +54,8 @@ public abstract class AbstractOutputStre
      * @param layout The layout to format the message.
      * @param manager The OutputStreamManager.
      */
-    protected AbstractOutputStreamAppender(String name, Layout layout, Filter filter, boolean handleException,
-                                boolean immediateFlush, OutputStreamManager manager) {
+    protected AbstractOutputStreamAppender(final String name, final Layout layout, final Filter filter, final boolean handleException,
+                                final boolean immediateFlush, final OutputStreamManager manager) {
         super(name, filter, layout, handleException);
         if (layout != null) {
             manager.setHeader(layout.getHeader());
@@ -69,11 +69,11 @@ public abstract class AbstractOutputStre
         return manager;
     }
 
-    protected void replaceManager(OutputStreamManager newManager) {
+    protected void replaceManager(final OutputStreamManager newManager) {
 
         writeLock.lock();
         try {
-            OutputStreamManager old = manager;
+            final OutputStreamManager old = manager;
             manager = newManager;
             old.release();
         } finally {
@@ -106,14 +106,14 @@ public abstract class AbstractOutputStre
      * override this method.
      * @param event The LogEvent.
      */
-    public void append(LogEvent event) {
+    public void append(final LogEvent event) {
         readLock.lock();
         try {
             manager.write(getLayout().toByteArray(event));
             if (this.immediateFlush) {
                 manager.flush();
             }
-        } catch (AppenderRuntimeException ex) {
+        } catch (final AppenderRuntimeException ex) {
             error("Unable to write to stream " + manager.getName() + " for appender " + getName());
             throw ex;
         } finally {

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AppenderRuntimeException.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AppenderRuntimeException.java?rev=1419697&r1=1419696&r2=1419697&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AppenderRuntimeException.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AppenderRuntimeException.java Mon Dec 10 19:36:06 2012
@@ -23,15 +23,15 @@ package org.apache.logging.log4j.core.ap
  */
 public class AppenderRuntimeException extends RuntimeException {
 
-    public AppenderRuntimeException(String msg) {
+    public AppenderRuntimeException(final String msg) {
         super(msg);
     }
 
-    public AppenderRuntimeException(String msg, Throwable ex) {
+    public AppenderRuntimeException(final String msg, final Throwable ex) {
         super(msg, ex);
     }
 
-    public AppenderRuntimeException(Throwable ex) {
+    public AppenderRuntimeException(final Throwable ex) {
         super(ex);
     }
 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsynchAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsynchAppender.java?rev=1419697&r1=1419696&r2=1419697&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsynchAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsynchAppender.java Mon Dec 10 19:36:06 2012
@@ -56,9 +56,9 @@ public final class AsynchAppender extend
     private AppenderControl errorAppender = null;
     private AsynchThread thread = null;
 
-    private AsynchAppender(String name, Filter filter, AppenderRef[] appenderRefs, String errorRef,
-                           int queueSize, boolean blocking,
-                           boolean handleExceptions, Configuration config) {
+    private AsynchAppender(final String name, final Filter filter, final AppenderRef[] appenderRefs, final String errorRef,
+                           final int queueSize, final boolean blocking,
+                           final boolean handleExceptions, final Configuration config) {
         super(name, filter, null, handleExceptions);
         this.queue = new ArrayBlockingQueue<Serializable>(queueSize);
         this.blocking = blocking;
@@ -69,9 +69,9 @@ public final class AsynchAppender extend
 
     @Override
     public void start() {
-        Map<String, Appender> map = config.getAppenders();
-        List<AppenderControl> appenders = new ArrayList<AppenderControl>();
-        for (AppenderRef appenderRef : appenderRefs) {
+        final Map<String, Appender> map = config.getAppenders();
+        final List<AppenderControl> appenders = new ArrayList<AppenderControl>();
+        for (final AppenderRef appenderRef : appenderRefs) {
             if (map.containsKey(appenderRef.getRef())) {
                 appenders.add(new AppenderControl(map.get(appenderRef.getRef()), null, null));
             } else {
@@ -101,7 +101,7 @@ public final class AsynchAppender extend
         thread.shutdown();
         try {
             thread.join();
-        } catch (InterruptedException ex) {
+        } catch (final InterruptedException ex) {
             LOGGER.warn("Interrupted while stopping AsynchAppender {}", getName());
         }
     }
@@ -111,7 +111,7 @@ public final class AsynchAppender extend
      * <p/>
      * @param event The LogEvent.
      */
-    public void append(LogEvent event) {
+    public void append(final LogEvent event) {
         if (!isStarted()) {
             throw new IllegalStateException("AsynchAppender " + getName() + " is not active");
         }
@@ -120,7 +120,7 @@ public final class AsynchAppender extend
                 try {
                     queue.add(Log4jLogEvent.serialize((Log4jLogEvent) event));
                     return;
-                } catch (IllegalStateException ex) {
+                } catch (final IllegalStateException ex) {
                     error("Appender " + getName() + " is unable to write primary appenders. queue is full");
                 }
             }
@@ -147,14 +147,14 @@ public final class AsynchAppender extend
      * @return The AsynchAppender.
      */
     @PluginFactory
-    public static AsynchAppender createAppender(@PluginElement("appender-ref") AppenderRef[] appenderRefs,
-                                                @PluginAttr("error-ref") String errorRef,
-                                                @PluginAttr("blocking") String blocking,
-                                                @PluginAttr("bufferSize") String size,
-                                                @PluginAttr("name") String name,
-                                                @PluginElement("filter") Filter filter,
-                                                @PluginConfiguration Configuration config,
-                                                @PluginAttr("suppressExceptions") String suppress) {
+    public static AsynchAppender createAppender(@PluginElement("appender-ref") final AppenderRef[] appenderRefs,
+                                                @PluginAttr("error-ref") final String errorRef,
+                                                @PluginAttr("blocking") final String blocking,
+                                                @PluginAttr("bufferSize") final String size,
+                                                @PluginAttr("name") final String name,
+                                                @PluginElement("filter") final Filter filter,
+                                                @PluginConfiguration final Configuration config,
+                                                @PluginAttr("suppressExceptions") final String suppress) {
         if (name == null) {
             LOGGER.error("No name provided for AsynchAppender");
             return null;
@@ -163,10 +163,10 @@ public final class AsynchAppender extend
             LOGGER.error("No appender references provided to AsynchAppender {}", name);
         }
 
-        boolean isBlocking = blocking == null ? true : Boolean.valueOf(blocking);
-        int queueSize = size == null ? DEFAULT_QUEUE_SIZE : Integer.parseInt(size);
+        final boolean isBlocking = blocking == null ? true : Boolean.valueOf(blocking);
+        final int queueSize = size == null ? DEFAULT_QUEUE_SIZE : Integer.parseInt(size);
 
-        boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
+        final boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
 
         return new AsynchAppender(name, filter, appenderRefs, errorRef, queueSize, isBlocking, handleExceptions,
                                   config);
@@ -181,7 +181,7 @@ public final class AsynchAppender extend
         private final List<AppenderControl> appenders;
         private final BlockingQueue<Serializable> queue;
 
-        public AsynchThread(List<AppenderControl> appenders, BlockingQueue<Serializable> queue) {
+        public AsynchThread(final List<AppenderControl> appenders, final BlockingQueue<Serializable> queue) {
             this.appenders = appenders;
             this.queue = queue;
         }
@@ -196,24 +196,24 @@ public final class AsynchAppender extend
                         shutdown = true;
                         continue;
                     }
-                } catch (InterruptedException ex) {
+                } catch (final InterruptedException ex) {
                     // No good reason for this.
                     continue;
                 }
-                Log4jLogEvent event = Log4jLogEvent.deserialize(s);
+                final Log4jLogEvent event = Log4jLogEvent.deserialize(s);
                 boolean success = false;
-                for (AppenderControl control : appenders) {
+                for (final AppenderControl control : appenders) {
                     try {
                         control.callAppender(event);
                         success = true;
-                    } catch (Exception ex) {
+                    } catch (final Exception ex) {
                         // If no appender is successful the error appender will get it.
                     }
                 }
                 if (!success && errorAppender != null) {
                     try {
                         errorAppender.callAppender(event);
-                    } catch (Exception ex) {
+                    } catch (final Exception ex) {
                         // Silently accept the error.
                     }
                 }
@@ -221,11 +221,11 @@ public final class AsynchAppender extend
             // Process any remaining items in the queue.
             while (!queue.isEmpty()) {
                 try {
-                    Log4jLogEvent event = Log4jLogEvent.deserialize(queue.take());
-                    for (AppenderControl control : appenders) {
+                    final Log4jLogEvent event = Log4jLogEvent.deserialize(queue.take());
+                    for (final AppenderControl control : appenders) {
                         control.callAppender(event);
                     }
-                } catch (InterruptedException ex) {
+                } catch (final InterruptedException ex) {
                     // May have been interrupted to shut down.
                 }
             }

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=1419697&r1=1419696&r2=1419697&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 Mon Dec 10 19:36:06 2012
@@ -55,8 +55,8 @@ public final class ConsoleAppender exten
         SYSTEM_ERR
     }
 
-    private ConsoleAppender(String name, Layout layout, Filter filter, OutputStreamManager manager,
-                           boolean handleExceptions) {
+    private ConsoleAppender(final String name, final Layout layout, final Filter filter, final OutputStreamManager manager,
+                           final boolean handleExceptions) {
         super(name, layout, filter, handleExceptions, true, manager);
     }
 
@@ -72,11 +72,11 @@ public final class ConsoleAppender exten
      */
     @PluginFactory
     public static ConsoleAppender createAppender(@PluginElement("layout") Layout layout,
-                                                 @PluginElement("filters") Filter filter,
-                                                 @PluginAttr("target") String t,
-                                                 @PluginAttr("name") String name,
-                                                 @PluginAttr("follow") String follow,
-                                                 @PluginAttr("suppressExceptions") String suppress) {
+                                                 @PluginElement("filters") final Filter filter,
+                                                 @PluginAttr("target") final String t,
+                                                 @PluginAttr("name") final String name,
+                                                 @PluginAttr("follow") final String follow,
+                                                 @PluginAttr("suppressExceptions") final String suppress) {
         if (name == null) {
             LOGGER.error("No name provided for ConsoleAppender");
             return null;
@@ -84,19 +84,19 @@ public final class ConsoleAppender exten
         if (layout == null) {
             layout = PatternLayout.createLayout(null, null, null, null);
         }
-        boolean isFollow = follow == null ? false : Boolean.valueOf(follow);
-        boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
-        Target target = t == null ? Target.SYSTEM_OUT : Target.valueOf(t);
+        final boolean isFollow = follow == null ? false : Boolean.valueOf(follow);
+        final boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
+        final Target target = t == null ? Target.SYSTEM_OUT : Target.valueOf(t);
         return new ConsoleAppender(name, layout, filter, getManager(isFollow, target), handleExceptions);
     }
 
-    private static OutputStreamManager getManager(boolean follow, Target target) {
-        String type = target.name();
-        OutputStream os = getOutputStream(follow, target);
+    private static OutputStreamManager getManager(final boolean follow, final Target target) {
+        final String type = target.name();
+        final OutputStream os = getOutputStream(follow, target);
         return OutputStreamManager.getManager(target.name() + "." + follow, new FactoryData(os, type), factory);
     }
 
-    private static OutputStream getOutputStream(boolean follow, Target target) {
+    private static OutputStream getOutputStream(final boolean follow, final Target target) {
         final PrintStream printStream = target == Target.SYSTEM_OUT ?
             follow ? new PrintStream(new SystemOutStream()) : System.out :
             follow ? new PrintStream(new SystemErrStream()) : System.err;
@@ -104,16 +104,16 @@ public final class ConsoleAppender exten
             return printStream;
         } else {
             try {
-                ClassLoader loader = Loader.getClassLoader();
+                final ClassLoader loader = Loader.getClassLoader();
                 // We type the parameter as a wildcard to avoid a hard reference to Jansi.
-                Class<?> clazz = loader.loadClass("org.fusesource.jansi.WindowsAnsiOutputStream");
-                Constructor<?> constructor = clazz.getConstructor(OutputStream.class);
+                final Class<?> clazz = loader.loadClass("org.fusesource.jansi.WindowsAnsiOutputStream");
+                final Constructor<?> constructor = clazz.getConstructor(OutputStream.class);
                 return (OutputStream) constructor.newInstance(printStream);
-            } catch (ClassNotFoundException cnfe) {
+            } catch (final ClassNotFoundException cnfe) {
                 LOGGER.debug("Jansi is not installed");
-            } catch (NoSuchMethodException nsme) {
+            } catch (final NoSuchMethodException nsme) {
                 LOGGER.warn("WindowsAnsiOutputStream is missing the proper constructor");
-            } catch (Exception ex) {
+            } catch (final Exception ex) {
                 LOGGER.warn("Unable to instantiate WindowsAnsiOutputStream");
             }
             return printStream;
@@ -194,15 +194,15 @@ public final class ConsoleAppender exten
      * Data to pass to factory method.
      */
     private static class FactoryData {
-        private OutputStream os;
-        private String type;
+        private final OutputStream os;
+        private final String type;
 
         /**
          * Constructor.
          * @param os The OutputStream.
          * @param type The name of the target.
          */
-        public FactoryData(OutputStream os, String type) {
+        public FactoryData(final OutputStream os, final String type) {
             this.os = os;
             this.type = type;
         }
@@ -219,7 +219,7 @@ public final class ConsoleAppender exten
          * @param data The data required to create the entity.
          * @return The OutputStreamManager
          */
-        public OutputStreamManager createManager(String name, FactoryData data) {
+        public OutputStreamManager createManager(final String name, final FactoryData data) {
             return new OutputStreamManager(data.os, data.type);
         }
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/DefaultErrorHandler.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/DefaultErrorHandler.java?rev=1419697&r1=1419696&r2=1419697&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/DefaultErrorHandler.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/DefaultErrorHandler.java Mon Dec 10 19:36:06 2012
@@ -39,7 +39,7 @@ public class DefaultErrorHandler impleme
 
     private final Appender appender;
 
-    public DefaultErrorHandler(Appender appender) {
+    public DefaultErrorHandler(final Appender appender) {
         this.appender = appender;
     }
 
@@ -48,8 +48,8 @@ public class DefaultErrorHandler impleme
      * Handle an error with a message.
      * @param msg The message.
      */
-    public void error(String msg) {
-        long current = System.currentTimeMillis();
+    public void error(final String msg) {
+        final long current = System.currentTimeMillis();
         if (lastException + EXCEPTION_INTERVAL < current || exceptionCount++ < MAX_EXCEPTIONS) {
             LOGGER.error(msg);
         }
@@ -61,8 +61,8 @@ public class DefaultErrorHandler impleme
      * @param msg The message.
      * @param t The Throwable.
      */
-    public void error(String msg, Throwable t) {
-        long current = System.currentTimeMillis();
+    public void error(final String msg, final Throwable t) {
+        final long current = System.currentTimeMillis();
         if (lastException + EXCEPTION_INTERVAL < current || exceptionCount++ < MAX_EXCEPTIONS) {
             LOGGER.error(msg, t);
         }
@@ -78,8 +78,8 @@ public class DefaultErrorHandler impleme
      * @param event The LogEvent.
      * @param t The Throwable.
      */
-    public void error(String msg, LogEvent event, Throwable t) {
-        long current = System.currentTimeMillis();
+    public void error(final String msg, final LogEvent event, final Throwable t) {
+        final long current = System.currentTimeMillis();
         if (lastException + EXCEPTION_INTERVAL < current || exceptionCount++ < MAX_EXCEPTIONS) {
             LOGGER.error(msg, t);
         }

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=1419697&r1=1419696&r2=1419697&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 Mon Dec 10 19:36:06 2012
@@ -50,8 +50,8 @@ public final class FailoverAppender exte
 
     private final List<AppenderControl> failoverAppenders = new ArrayList<AppenderControl>();
 
-    private FailoverAppender(String name, Filter filter, String primary, String[] failovers,
-                            Configuration config, boolean handleExceptions) {
+    private FailoverAppender(final String name, final Filter filter, final String primary, final String[] failovers,
+                            final Configuration config, final boolean handleExceptions) {
         super(name, filter, null, handleExceptions);
         this.primaryRef = primary;
         this.failovers = failovers;
@@ -61,7 +61,7 @@ public final class FailoverAppender exte
 
     @Override
     public void start() {
-        Map<String, Appender> map = config.getAppenders();
+        final Map<String, Appender> map = config.getAppenders();
         int errors = 0;
         if (map.containsKey(primaryRef)) {
             primary = new AppenderControl(map.get(primaryRef), null, null);
@@ -69,7 +69,7 @@ public final class FailoverAppender exte
             LOGGER.error("Unable to locate primary Appender " + primaryRef);
             ++errors;
         }
-        for (String name : failovers) {
+        for (final String name : failovers) {
             if (map.containsKey(name)) {
                 failoverAppenders.add(new AppenderControl(map.get(name), null, null));
             } else {
@@ -89,7 +89,7 @@ public final class FailoverAppender exte
      * Handle the Log event.
      * @param event The LogEvent.
      */
-    public void append(LogEvent event) {
+    public void append(final LogEvent event) {
         RuntimeException re = null;
         if (!isStarted()) {
             error("FailoverAppender " + getName() + " did not start successfully");
@@ -97,15 +97,15 @@ public final class FailoverAppender exte
         }
         try {
             primary.callAppender(event);
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             re = new LoggingException(ex);
             boolean written = false;
-            for (AppenderControl control : failoverAppenders) {
+            for (final AppenderControl control : failoverAppenders) {
                 try {
                     control.callAppender(event);
                     written = true;
                     break;
-                } catch (Exception fex) {
+                } catch (final Exception fex) {
                     continue;
                 }
             }
@@ -117,10 +117,10 @@ public final class FailoverAppender exte
 
     @Override
     public String toString() {
-        StringBuilder sb = new StringBuilder(getName());
+        final StringBuilder sb = new StringBuilder(getName());
         sb.append(" primary=").append(primary).append(", failover={");
         boolean first = true;
-        for (String str : failovers) {
+        for (final String str : failovers) {
             if (!first) {
                 sb.append(", ");
             }
@@ -143,12 +143,12 @@ public final class FailoverAppender exte
      * @return The FailoverAppender that was created.
      */
     @PluginFactory
-    public static FailoverAppender createAppender(@PluginAttr("name") String name,
-                                                  @PluginAttr("primary") String primary,
-                                                  @PluginElement("failovers") String[] failovers,
-                                                  @PluginConfiguration Configuration config,
-                                                  @PluginElement("filters") Filter filter,
-                                                  @PluginAttr("suppressExceptions") String suppress) {
+    public static FailoverAppender createAppender(@PluginAttr("name") final String name,
+                                                  @PluginAttr("primary") final String primary,
+                                                  @PluginElement("failovers") final String[] failovers,
+                                                  @PluginConfiguration final Configuration config,
+                                                  @PluginElement("filters") final Filter filter,
+                                                  @PluginAttr("suppressExceptions") final String suppress) {
         if (name == null) {
             LOGGER.error("A name for the Appender must be specified");
             return null;
@@ -162,7 +162,7 @@ public final class FailoverAppender exte
             return null;
         }
 
-        boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
+        final boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
 
         return new FailoverAppender(name, filter, primary, failovers, config, handleExceptions);
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FailoversPlugin.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FailoversPlugin.java?rev=1419697&r1=1419696&r2=1419697&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FailoversPlugin.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FailoversPlugin.java Mon Dec 10 19:36:06 2012
@@ -43,13 +43,13 @@ public final class FailoversPlugin {
      * @return The appender references.
      */
     @PluginFactory
-    public static String[] createFailovers(@PluginElement("appender-ref") AppenderRef... refs) {
+    public static String[] createFailovers(@PluginElement("appender-ref") final AppenderRef... refs) {
 
         if (refs == null) {
             logger.error("failovers must contain an appender-reference");
             return null;
         }
-        String[] arr = new String[refs.length];
+        final String[] arr = new String[refs.length];
         for (int i = 0; i < refs.length; ++i) {
             arr[i] = refs[i].getRef();
         }

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=1419697&r1=1419696&r2=1419697&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 Mon Dec 10 19:36:06 2012
@@ -32,8 +32,8 @@ public final class FileAppender extends 
 
     private final String fileName;
 
-    private FileAppender(String name, Layout layout, Filter filter, FileManager manager, String filename,
-                        boolean handleException, boolean immediateFlush) {
+    private FileAppender(final String name, final Layout layout, final Filter filter, final FileManager manager, final String filename,
+                        final boolean handleException, final boolean immediateFlush) {
         super(name, layout, filter, handleException, immediateFlush, manager);
         this.fileName = filename;
     }
@@ -64,18 +64,18 @@ public final class FileAppender extends 
      * @return The FileAppender.
      */
     @PluginFactory
-    public static FileAppender createAppender(@PluginAttr("fileName") String fileName,
-                                              @PluginAttr("append") String append,
-                                              @PluginAttr("locking") String locking,
-                                              @PluginAttr("name") String name,
-                                              @PluginAttr("immediateFlush") String immediateFlush,
-                                              @PluginAttr("suppressExceptions") String suppress,
-                                              @PluginAttr("bufferedIO") String bufferedIO,
+    public static FileAppender createAppender(@PluginAttr("fileName") final String fileName,
+                                              @PluginAttr("append") final String append,
+                                              @PluginAttr("locking") final String locking,
+                                              @PluginAttr("name") final String name,
+                                              @PluginAttr("immediateFlush") final String immediateFlush,
+                                              @PluginAttr("suppressExceptions") final String suppress,
+                                              @PluginAttr("bufferedIO") final String bufferedIO,
                                               @PluginElement("layout") Layout layout,
-                                              @PluginElement("filters") Filter filter) {
+                                              @PluginElement("filters") final Filter filter) {
 
-        boolean isAppend = append == null ? true : Boolean.valueOf(append);
-        boolean isLocking = locking == null ? false : Boolean.valueOf(locking);
+        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);
         if (isLocking && isBuffered) {
             if (bufferedIO != null) {
@@ -83,8 +83,8 @@ public final class FileAppender extends 
             }
             isBuffered = false;
         }
-        boolean isFlush = immediateFlush == null ? true : Boolean.valueOf(immediateFlush);
-        boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
+        final boolean isFlush = immediateFlush == null ? true : Boolean.valueOf(immediateFlush);
+        final boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
 
         if (name == null) {
             LOGGER.error("No name provided for FileAppender");
@@ -96,7 +96,7 @@ public final class FileAppender extends 
             return null;
         }
 
-        FileManager manager = FileManager.getFileManager(fileName, isAppend, isLocking, isBuffered);
+        final FileManager manager = FileManager.getFileManager(fileName, isAppend, isLocking, isBuffered);
         if (manager == null) {
             return null;
         }

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=1419697&r1=1419696&r2=1419697&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 Mon Dec 10 19:36:06 2012
@@ -36,7 +36,7 @@ public class FileManager extends OutputS
     private final boolean isAppend;
     private final boolean isLocking;
 
-    protected FileManager(String fileName, OutputStream os, boolean append, boolean locking) {
+    protected FileManager(final String fileName, final OutputStream os, final boolean append, final boolean locking) {
         super(os, fileName);
         this.isAppend = append;
         this.isLocking = locking;
@@ -50,7 +50,7 @@ public class FileManager extends OutputS
      * @param bufferedIO true if the contents should be buffered as they are written.
      * @return A FileManager for the File.
      */
-    public static FileManager getFileManager(String fileName, boolean append, boolean locking, boolean bufferedIO) {
+    public static FileManager getFileManager(final String fileName, final boolean append, boolean locking, final boolean bufferedIO) {
 
         if (locking && bufferedIO) {
             locking = false;
@@ -59,10 +59,10 @@ public class FileManager extends OutputS
     }
 
     @Override
-    protected synchronized void write(byte[] bytes, int offset, int length)  {
+    protected synchronized void write(final byte[] bytes, final int offset, final int length)  {
 
         if (isLocking) {
-            FileChannel channel = ((FileOutputStream) getOutputStream()).getChannel();
+            final FileChannel channel = ((FileOutputStream) getOutputStream()).getChannel();
             try {
                 /* Lock the whole file. This could be optimized to only lock from the current file
                    position. Note that locking may be advisory on some systems and mandatory on others,
@@ -71,13 +71,13 @@ public class FileManager extends OutputS
                    file is already locked by another FileChannel in the same JVM. Hopefully, that will
                    be avoided since every file should have a single file manager - unless two different
                    files strings are configured that somehow map to the same file.*/
-                FileLock lock = channel.lock(0, Long.MAX_VALUE, false);
+                final FileLock lock = channel.lock(0, Long.MAX_VALUE, false);
                 try {
                     super.write(bytes, offset, length);
                 } finally {
                     lock.release();
                 }
-            } catch (IOException ex) {
+            } catch (final IOException ex) {
                 throw new AppenderRuntimeException("Unable to obtain lock on " + getName(), ex);
             }
 
@@ -124,7 +124,7 @@ public class FileManager extends OutputS
          * @param locking Locking status.
          * @param bufferedIO Buffering flag.
          */
-        public FactoryData(boolean append, boolean locking, boolean bufferedIO) {
+        public FactoryData(final boolean append, final boolean locking, final boolean bufferedIO) {
             this.append = append;
             this.locking = locking;
             this.bufferedIO = bufferedIO;
@@ -142,8 +142,8 @@ public class FileManager extends OutputS
          * @param data The FactoryData
          * @return The FileManager for the File.
          */
-        public FileManager createManager(String name, FactoryData data) {
-            File file = new File(name);
+        public FileManager 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();
@@ -156,7 +156,7 @@ public class FileManager extends OutputS
                     os = new BufferedOutputStream(os);
                 }
                 return new FileManager(name, os, data.append, data.locking);
-            } catch (FileNotFoundException ex) {
+            } catch (final FileNotFoundException ex) {
                 LOGGER.error("FileManager (" + name + ") " + ex);
             }
             return null;

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=1419697&r1=1419696&r2=1419697&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 Mon Dec 10 19:36:06 2012
@@ -34,8 +34,8 @@ public final class JMSQueueAppender exte
 
     private final JMSQueueManager manager;
 
-    private JMSQueueAppender(String name, Filter filter, Layout layout, JMSQueueManager manager,
-                            boolean handleExceptions) {
+    private JMSQueueAppender(final String name, final Filter filter, final Layout layout, final JMSQueueManager manager,
+                            final boolean handleExceptions) {
         super(name, filter, layout, handleExceptions);
         this.manager = manager;
     }
@@ -45,10 +45,10 @@ public final class JMSQueueAppender exte
      * <p/>
      * @param event The LogEvent.
      */
-    public void append(LogEvent event) {
+    public void append(final LogEvent event) {
         try {
             manager.send(getLayout().toSerializable(event));
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             throw new AppenderRuntimeException(ex);
         }
     }
@@ -73,25 +73,25 @@ public final class JMSQueueAppender exte
      * @return The JMSQueueAppender.
      */
     @PluginFactory
-    public static JMSQueueAppender createAppender(@PluginAttr("name") String name,
-                                                  @PluginAttr("factoryName") String factoryName,
-                                                  @PluginAttr("providerURL") String providerURL,
-                                                  @PluginAttr("urlPkgPrefixes") String urlPkgPrefixes,
-                                                  @PluginAttr("securityPrincipalName") String securityPrincipalName,
-                                                  @PluginAttr("securityCredentials") String securityCredentials,
-                                                  @PluginAttr("factoryBindingName") String factoryBindingName,
-                                                  @PluginAttr("queueBindingName") String queueBindingName,
-                                                  @PluginAttr("userName") String userName,
-                                                  @PluginAttr("password") String password,
+    public static JMSQueueAppender createAppender(@PluginAttr("name") final String name,
+                                                  @PluginAttr("factoryName") final String factoryName,
+                                                  @PluginAttr("providerURL") final String providerURL,
+                                                  @PluginAttr("urlPkgPrefixes") final String urlPkgPrefixes,
+                                                  @PluginAttr("securityPrincipalName") final String securityPrincipalName,
+                                                  @PluginAttr("securityCredentials") final String securityCredentials,
+                                                  @PluginAttr("factoryBindingName") final String factoryBindingName,
+                                                  @PluginAttr("queueBindingName") final String queueBindingName,
+                                                  @PluginAttr("userName") final String userName,
+                                                  @PluginAttr("password") final String password,
                                                   @PluginElement("layout") Layout layout,
-                                                  @PluginElement("filter") Filter filter,
-                                                  @PluginAttr("suppressExceptions") String suppress) {
+                                                  @PluginElement("filter") final Filter filter,
+                                                  @PluginAttr("suppressExceptions") final String suppress) {
         if (name == null) {
             LOGGER.error("No name provided for JMSQueueAppender");
             return null;
         }
-        boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
-        JMSQueueManager manager = JMSQueueManager.getJMSQueueManager(factoryName, providerURL, urlPkgPrefixes,
+        final boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
+        final JMSQueueManager manager = JMSQueueManager.getJMSQueueManager(factoryName, providerURL, urlPkgPrefixes,
             securityPrincipalName, securityCredentials, factoryBindingName, queueBindingName, userName, password);
         if (manager == null) {
             return null;

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=1419697&r1=1419696&r2=1419697&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 Mon Dec 10 19:36:06 2012
@@ -34,8 +34,8 @@ public final class JMSTopicAppender exte
 
     private final JMSTopicManager manager;
 
-    private JMSTopicAppender(String name, Filter filter, Layout layout, JMSTopicManager manager,
-                            boolean handleExceptions) {
+    private JMSTopicAppender(final String name, final Filter filter, final Layout layout, final JMSTopicManager manager,
+                            final boolean handleExceptions) {
         super(name, filter, layout, handleExceptions);
         this.manager = manager;
     }
@@ -45,10 +45,10 @@ public final class JMSTopicAppender exte
      * <p/>
      * @param event The LogEvent.
      */
-    public void append(LogEvent event) {
+    public void append(final LogEvent event) {
         try {
             manager.send(getLayout().toSerializable(event));
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             throw new AppenderRuntimeException(ex);
         }
     }
@@ -73,26 +73,26 @@ public final class JMSTopicAppender exte
      * @return The JMSTopicAppender.
      */
     @PluginFactory
-    public static JMSTopicAppender createAppender(@PluginAttr("name") String name,
-                                                  @PluginAttr("factoryName") String factoryName,
-                                                  @PluginAttr("providerURL") String providerURL,
-                                                  @PluginAttr("urlPkgPrefixes") String urlPkgPrefixes,
-                                                  @PluginAttr("securityPrincipalName") String securityPrincipalName,
-                                                  @PluginAttr("securityCredentials") String securityCredentials,
-                                                  @PluginAttr("factoryBindingName") String factoryBindingName,
-                                                  @PluginAttr("topicBindingName") String topicBindingName,
-                                                  @PluginAttr("userName") String userName,
-                                                  @PluginAttr("password") String password,
+    public static JMSTopicAppender createAppender(@PluginAttr("name") final String name,
+                                                  @PluginAttr("factoryName") final String factoryName,
+                                                  @PluginAttr("providerURL") final String providerURL,
+                                                  @PluginAttr("urlPkgPrefixes") final String urlPkgPrefixes,
+                                                  @PluginAttr("securityPrincipalName") final String securityPrincipalName,
+                                                  @PluginAttr("securityCredentials") final String securityCredentials,
+                                                  @PluginAttr("factoryBindingName") final String factoryBindingName,
+                                                  @PluginAttr("topicBindingName") final String topicBindingName,
+                                                  @PluginAttr("userName") final String userName,
+                                                  @PluginAttr("password") final String password,
                                                   @PluginElement("layout") Layout layout,
-                                                  @PluginElement("filters") Filter filter,
-                                                  @PluginAttr("suppressExceptions") String suppress) {
+                                                  @PluginElement("filters") final Filter filter,
+                                                  @PluginAttr("suppressExceptions") final String suppress) {
 
         if (name == null) {
             LOGGER.error("No name provided for JMSQueueAppender");
             return null;
         }
-        boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
-        JMSTopicManager manager = JMSTopicManager.getJMSTopicManager(factoryName, providerURL, urlPkgPrefixes,
+        final boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
+        final JMSTopicManager manager = JMSTopicManager.getJMSTopicManager(factoryName, providerURL, urlPkgPrefixes,
             securityPrincipalName, securityCredentials, factoryBindingName, topicBindingName, userName, password);
         if (manager == null) {
             return null;



Mime
View raw message