logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1476703 [3/4] - in /logging/log4j/log4j2/trunk: ./ api/ core/ core/src/main/java/org/apache/logging/log4j/core/appender/ core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/ core/src/main/java/org/apache/logging/log4j/core/ap...
Date Sun, 28 Apr 2013 01:27:29 GMT
Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/SocketTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/SocketTest.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/SocketTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/SocketTest.java Sun Apr 28 01:27:27 2013
@@ -16,12 +16,6 @@
  */
 package org.apache.logging.log4j.core.net;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.core.appender.AppenderRuntimeException;
@@ -29,6 +23,13 @@ import org.apache.logging.log4j.core.con
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+
 import static org.junit.Assert.fail;
 
 public class SocketTest {
@@ -64,6 +65,7 @@ public class SocketTest {
         private ServerSocket server;
         private Socket client;
 
+        @Override
         public InputStream call() throws Exception {
             server = new ServerSocket(SOCKET_PORT);
             client = server.accept();

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/ExtendedThrowableTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/ExtendedThrowableTest.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/ExtendedThrowableTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/ExtendedThrowableTest.java Sun Apr 28 01:27:27 2013
@@ -38,17 +38,18 @@ import static org.junit.Assert.*;
 public class ExtendedThrowableTest {
     private static final String CONFIG = "log4j-throwablefilter.xml";
     private static Configuration config;
-    private static ListAppender app;
+    private static ListAppender<String> app;
     private static LoggerContext ctx;
 
     @BeforeClass
+    @SuppressWarnings("unchecked")
     public static void setupClass() {
         System.setProperty(XMLConfigurationFactory.CONFIGURATION_FILE_PROPERTY, CONFIG);
         ctx = (LoggerContext) LogManager.getContext(false);
         config = ctx.getConfiguration();
         for (final Map.Entry<String, Appender<?>> entry : config.getAppenders().entrySet()) {
             if (entry.getKey().equals("List")) {
-                app = (ListAppender) entry.getValue();
+                app = (ListAppender<String>) entry.getValue();
             }
         }
     }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/RegexReplacementTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/RegexReplacementTest.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/RegexReplacementTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/RegexReplacementTest.java Sun Apr 28 01:27:27 2013
@@ -42,23 +42,24 @@ import static org.junit.Assert.assertTru
 public class RegexReplacementTest {
     private static final String CONFIG = "log4j-replace.xml";
     private static Configuration config;
-    private static ListAppender app;
-    private static ListAppender app2;
+    private static ListAppender<String> app;
+    private static ListAppender<String> app2;
     private static LoggerContext ctx;
 
     private static final String EXPECTED = "/RegexReplacementTest" + Constants.LINE_SEP;
 
     @BeforeClass
+    @SuppressWarnings("unchecked")
     public static void setupClass() {
         System.setProperty(XMLConfigurationFactory.CONFIGURATION_FILE_PROPERTY, CONFIG);
         ctx = (LoggerContext) LogManager.getContext(false);
         config = ctx.getConfiguration();
         for (final Map.Entry<String, Appender<?>> entry : config.getAppenders().entrySet()) {
             if (entry.getKey().equals("List")) {
-                app = (ListAppender) entry.getValue();
+                app = (ListAppender<String>) entry.getValue();
             }
             if (entry.getKey().equals("List2")) {
-                app2 = (ListAppender) entry.getValue();
+                app2 = (ListAppender<String>) entry.getValue();
             }
         }
     }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/RootThrowableTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/RootThrowableTest.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/RootThrowableTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/RootThrowableTest.java Sun Apr 28 01:27:27 2013
@@ -39,17 +39,18 @@ import static org.junit.Assert.assertTru
 public class RootThrowableTest {
     private static final String CONFIG = "log4j-rootthrowablefilter.xml";
     private static Configuration config;
-    private static ListAppender app;
+    private static ListAppender<String> app;
     private static LoggerContext ctx;
 
     @BeforeClass
+    @SuppressWarnings("unchecked")
     public static void setupClass() {
         System.setProperty(XMLConfigurationFactory.CONFIGURATION_FILE_PROPERTY, CONFIG);
         ctx = (LoggerContext) LogManager.getContext(false);
         config = ctx.getConfiguration();
         for (final Map.Entry<String, Appender<?>> entry : config.getAppenders().entrySet()) {
             if (entry.getKey().equals("List")) {
-                app = (ListAppender) entry.getValue();
+                app = (ListAppender<String>) entry.getValue();
             }
         }
     }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/StyleConverterTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/StyleConverterTest.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/StyleConverterTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/StyleConverterTest.java Sun Apr 28 01:27:27 2013
@@ -41,7 +41,7 @@ import static org.junit.Assert.assertTru
 public class StyleConverterTest {
     private static final String CONFIG = "log4j-style.xml";
     private static Configuration config;
-    private static ListAppender app;
+    private static ListAppender<String> app;
     private static LoggerContext ctx;
 
     private static final String EXPECTED =
@@ -49,13 +49,14 @@ public class StyleConverterTest {
         + Constants.LINE_SEP;
 
     @BeforeClass
+    @SuppressWarnings("unchecked")
     public static void setupClass() {
         System.setProperty(XMLConfigurationFactory.CONFIGURATION_FILE_PROPERTY, CONFIG);
         ctx = (LoggerContext) LogManager.getContext(false);
         config = ctx.getConfiguration();
         for (final Map.Entry<String, Appender<?>> entry : config.getAppenders().entrySet()) {
             if (entry.getKey().equals("List")) {
-                app = (ListAppender) entry.getValue();
+                app = (ListAppender<String>) entry.getValue();
             }
         }
     }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/ThrowableTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/ThrowableTest.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/ThrowableTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/ThrowableTest.java Sun Apr 28 01:27:27 2013
@@ -38,17 +38,18 @@ import static org.junit.Assert.*;
 public class ThrowableTest {
     private static final String CONFIG = "log4j-throwable.xml";
     private static Configuration config;
-    private static ListAppender app;
+    private static ListAppender<String> app;
     private static LoggerContext ctx;
 
     @BeforeClass
+    @SuppressWarnings("unchecked")
     public static void setupClass() {
         System.setProperty(XMLConfigurationFactory.CONFIGURATION_FILE_PROPERTY, CONFIG);
         ctx = (LoggerContext) LogManager.getContext(false);
         config = ctx.getConfiguration();
         for (final Map.Entry<String, Appender<?>> entry : config.getAppenders().entrySet()) {
             if (entry.getKey().equals("List")) {
-                app = (ListAppender) entry.getValue();
+                app = (ListAppender<String>) entry.getValue();
             }
         }
     }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/util/Profiler.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/util/Profiler.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/util/Profiler.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/util/Profiler.java Sun Apr 28 01:27:27 2013
@@ -24,7 +24,7 @@ import java.lang.reflect.Field;
 public class Profiler {
     private static Object profiler;
     private static Class profilingModes;
-    private static Class controllerClazz;
+    private static Class<?> controllerClazz;
 
     static {
         try {

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/AlwaysFailAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/AlwaysFailAppender.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/AlwaysFailAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/AlwaysFailAppender.java Sun Apr 28 01:27:27 2013
@@ -23,28 +23,31 @@ import org.apache.logging.log4j.core.con
 import org.apache.logging.log4j.core.config.plugins.PluginAttr;
 import org.apache.logging.log4j.core.config.plugins.PluginFactory;
 
+import java.io.Serializable;
+
 /**
  *
  */
 @Plugin(name="AlwaysFail",type="Core",elementType="appender",printObject=true)
-public class AlwaysFailAppender extends AbstractAppender {
+public class AlwaysFailAppender<T extends Serializable> extends AbstractAppender<T> {
 
     private AlwaysFailAppender(final String name) {
         super(name, null, null, false);
     }
 
+    @Override
     public void append(final LogEvent event) {
         throw new LoggingException("Always fail");
     }
 
     @PluginFactory
-    public static AlwaysFailAppender createAppender(@PluginAttr("name") final String name) {
+    public static <S extends Serializable> AlwaysFailAppender<S> createAppender(@PluginAttr("name") final String name) {
         if (name == null) {
             LOGGER.error("A name for the Appender must be specified");
             return null;
         }
 
-        return new AlwaysFailAppender(name);
+        return new AlwaysFailAppender<S>(name);
     }
 
 }

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=1476703&r1=1476702&r2=1476703&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 Sun Apr 28 01:27:27 2013
@@ -23,6 +23,7 @@ import org.apache.logging.log4j.core.con
 import org.apache.logging.log4j.core.config.plugins.PluginAttr;
 import org.apache.logging.log4j.core.config.plugins.PluginFactory;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -30,7 +31,7 @@ import java.util.List;
  *
  */
 @Plugin(name="FailOnce",type="Core",elementType="appender",printObject=true)
-public class FailOnceAppender extends AbstractAppender {
+public class FailOnceAppender<T extends Serializable> extends AbstractAppender<T> {
 
     boolean fail = true;
 
@@ -40,6 +41,7 @@ public class FailOnceAppender extends Ab
         super(name, null, null, false);
     }
 
+    @Override
     public void append(final LogEvent event) {
         if (fail) {
             fail = false;
@@ -56,13 +58,13 @@ public class FailOnceAppender extends Ab
     }
 
     @PluginFactory
-    public static FailOnceAppender createAppender(@PluginAttr("name") final String name) {
+    public static <S extends Serializable> FailOnceAppender<S> createAppender(@PluginAttr("name") final String name) {
         if (name == null) {
             LOGGER.error("A name for the Appender must be specified");
             return null;
         }
 
-        return new FailOnceAppender(name);
+        return new FailOnceAppender<S>(name);
     }
 
 }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/InMemoryAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/InMemoryAppender.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/InMemoryAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/InMemoryAppender.java Sun Apr 28 01:27:27 2013
@@ -22,13 +22,15 @@ import org.apache.logging.log4j.core.app
 import org.apache.logging.log4j.core.filter.CompositeFilter;
 
 import java.io.ByteArrayOutputStream;
+import java.io.Serializable;
 
 /**
  *
  */
-public class InMemoryAppender extends AbstractOutputStreamAppender {
+public class InMemoryAppender<T extends Serializable> extends AbstractOutputStreamAppender<T> {
 
-    public InMemoryAppender(final String name, final Layout layout, final CompositeFilter filters, final boolean handleException) {
+    public InMemoryAppender(final String name, final Layout<T> layout, final CompositeFilter filters,
+                            final boolean handleException) {
         super(name, layout, filters, handleException, true, new InMemoryManager(name));
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/ListAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/ListAppender.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/ListAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/ListAppender.java Sun Apr 28 01:27:27 2013
@@ -26,6 +26,7 @@ import org.apache.logging.log4j.core.con
 import org.apache.logging.log4j.core.config.plugins.PluginFactory;
 import org.apache.logging.log4j.core.layout.SerializedLayout;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -35,7 +36,7 @@ import java.util.List;
  * List could eventually grow to cause an OutOfMemoryError.
  */
 @Plugin(name = "List", type = "Core", elementType = "appender", printObject = true)
-public class ListAppender extends AbstractAppender {
+public class ListAppender<T extends Serializable> extends AbstractAppender<T> {
 
     private final List<LogEvent> events = new ArrayList<LogEvent>();
 
@@ -55,7 +56,8 @@ public class ListAppender extends Abstra
         raw = false;
     }
 
-    public ListAppender(final String name, final Filter filter, final Layout layout, final boolean newline, final boolean raw) {
+    public ListAppender(final String name, final Filter filter, final Layout<T> layout, final boolean newline,
+                        final boolean raw) {
         super(name, filter, layout);
         this.newLine = newline;
         this.raw = raw;
@@ -67,6 +69,7 @@ public class ListAppender extends Abstra
         }
     }
 
+    @Override
     public synchronized void append(final LogEvent event) {
         final Layout layout = getLayout();
         if (layout == null) {
@@ -151,10 +154,10 @@ public class ListAppender extends Abstra
     }
 
     @PluginFactory
-    public static ListAppender createAppender(@PluginAttr("name") final String name,
+    public static <S extends Serializable> ListAppender<S> createAppender(@PluginAttr("name") final String name,
                                               @PluginAttr("entryPerNewLine") final String newLine,
                                               @PluginAttr("raw") final String raw,
-                                              @PluginElement("layout") final Layout layout,
+                                              @PluginElement("layout") final Layout<S> layout,
                                               @PluginElement("filters") final Filter filter) {
 
         if (name == null) {
@@ -162,9 +165,9 @@ public class ListAppender extends Abstra
             return null;
         }
 
-        final boolean nl = (newLine == null) ? false : Boolean.parseBoolean(newLine);
-        final boolean r = (raw == null) ? false : Boolean.parseBoolean(raw);
+        final boolean nl = newLine != null && Boolean.parseBoolean(newLine);
+        final boolean r = raw != null && Boolean.parseBoolean(raw);
 
-        return new ListAppender(name, filter, layout, nl, r);
+        return new ListAppender<S>(name, filter, layout, nl, r);
     }
 }

Modified: logging/log4j/log4j2/trunk/flume-ng/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/pom.xml?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/pom.xml (original)
+++ logging/log4j/log4j2/trunk/flume-ng/pom.xml Sun Apr 28 01:27:27 2013
@@ -257,8 +257,9 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-pmd-plugin</artifactId>
+        <version>${pmd.plugin.version}</version>
         <configuration>
-          <targetJdk>1.5</targetJdk>
+          <targetJdk>${maven.compile.target}</targetJdk>
         </configuration>
       </plugin>
       <plugin>

Modified: logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java (original)
+++ logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java Sun Apr 28 01:27:27 2013
@@ -27,13 +27,14 @@ import org.apache.logging.log4j.core.con
 import org.apache.logging.log4j.core.config.plugins.PluginFactory;
 import org.apache.logging.log4j.core.layout.RFC5424Layout;
 
+import java.io.Serializable;
 import java.util.Locale;
 
 /**
  * An Appender that uses the Avro protocol to route events to Flume.
  */
 @Plugin(name = "Flume", type = "Core", elementType = "appender", printObject = true)
-public final class FlumeAppender extends AbstractAppender implements FlumeEventFactory {
+public final class FlumeAppender<T extends Serializable> extends AbstractAppender<T> implements FlumeEventFactory {
 
     private final AbstractFlumeManager manager;
 
@@ -57,7 +58,7 @@ public final class FlumeAppender extends
         }
     }
 
-    private FlumeAppender(final String name, final Filter filter, final Layout layout, final boolean handleException,
+    private FlumeAppender(final String name, final Filter filter, final Layout<T> layout, final boolean handleException,
                           final String includes, final String excludes, final String required, final String mdcPrefix,
                           final String eventPrefix, final boolean compress,
                           final FlumeEventFactory factory, final AbstractFlumeManager manager) {
@@ -136,7 +137,7 @@ public final class FlumeAppender extends
      * @return A Flume Avro Appender.
      */
     @PluginFactory
-    public static FlumeAppender createAppender(@PluginElement("agents") Agent[] agents,
+    public static <S extends Serializable> FlumeAppender<S> createAppender(@PluginElement("agents") Agent[] agents,
                                                    @PluginElement("properties") final Property[] properties,
                                                    @PluginAttr("embedded") final String embedded,
                                                    @PluginAttr("type") final String type,
@@ -155,7 +156,7 @@ public final class FlumeAppender extends
                                                    @PluginAttr("compress") final String compressBody,
                                                    @PluginAttr("batchSize") final String batchSize,
                                                    @PluginElement("flumeEventFactory") final FlumeEventFactory factory,
-                                                   @PluginElement("layout") Layout layout,
+                                                   @PluginElement("layout") Layout<S> layout,
                                                    @PluginElement("filters") final Filter filter) {
 
         final boolean embed = embedded != null ? Boolean.valueOf(embedded) :
@@ -192,10 +193,11 @@ public final class FlumeAppender extends
         final int retries = agentRetries == null ? 0 : Integer.parseInt(agentRetries);
         final int delay = maxDelay == null ? 60000 : Integer.parseInt(maxDelay);
 
-
         if (layout == null) {
-            layout = RFC5424Layout.createLayout(null, null, null, "True", null, mdcPrefix, eventPrefix, null, null,
-                null, excludes, includes, required, null, null, null, null);
+            @SuppressWarnings({"unchecked", "UnnecessaryLocalVariable"})
+            Layout<S> l = (Layout<S>)RFC5424Layout.createLayout(null, null, null, "True", null, mdcPrefix, eventPrefix,
+                    null, null, null, excludes, includes, required, null, null, null, null);
+            layout = l;
         }
 
         if (name == null) {
@@ -237,7 +239,7 @@ public final class FlumeAppender extends
             return null;
         }
 
-        return new FlumeAppender(name, filter, layout,  handleExceptions, includes,
+        return new FlumeAppender<S>(name, filter, layout,  handleExceptions, includes,
             excludes, required, mdcPrefix, eventPrefix, compress, factory, manager);
     }
 }

Modified: logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAvroManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAvroManager.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAvroManager.java (original)
+++ logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAvroManager.java Sun Apr 28 01:27:27 2013
@@ -31,7 +31,7 @@ public class FlumeAvroManager extends Ab
 
     private static final int MAX_RECONNECTS = 3;
 
-    private static ManagerFactory factory = new AvroManagerFactory();
+    private static AvroManagerFactory factory = new AvroManagerFactory();
 
     private final Agent[] agents;
 
@@ -95,8 +95,8 @@ public class FlumeAvroManager extends Ab
             first = false;
         }
         sb.append("]");
-        return (FlumeAvroManager) getManager(sb.toString(), factory, new FactoryData(name, agents, batchSize, retries,
-            connectTimeout, requestTimeout));
+        return getManager(sb.toString(), factory,
+                new FactoryData(name, agents, batchSize, retries, connectTimeout, requestTimeout));
     }
 
     /**

Modified: logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java (original)
+++ logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java Sun Apr 28 01:27:27 2013
@@ -37,7 +37,7 @@ public class FlumeEmbeddedManager extend
     /** Name for the Flume source */
     protected static final String SOURCE_NAME = "log4j-source";
 
-    private static ManagerFactory factory = new FlumeManagerFactory();
+    private static FlumeManagerFactory factory = new FlumeManagerFactory();
 
     private static final String FiLE_SEP = PropertiesUtil.getProperties().getStringProperty("file.separator");
 
@@ -114,8 +114,8 @@ public class FlumeEmbeddedManager extend
             }
             sb.append(NameUtil.md5(props.toString()));
         }
-        return (FlumeEmbeddedManager) getManager(sb.toString(), factory,
-            new FactoryData(name, agents, properties, batchSize, dataDir));
+        return getManager(sb.toString(), factory,
+                new FactoryData(name, agents, properties, batchSize, dataDir));
     }
 
     @Override

Modified: logging/log4j/log4j2/trunk/jcl-bridge/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/jcl-bridge/pom.xml?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/jcl-bridge/pom.xml (original)
+++ logging/log4j/log4j2/trunk/jcl-bridge/pom.xml Sun Apr 28 01:27:27 2013
@@ -165,7 +165,7 @@
             <artifactId>maven-pmd-plugin</artifactId>
             <version>${pmd.plugin.version}</version>
             <configuration>
-              <targetJdk>1.5</targetJdk>
+              <targetJdk>${maven.compile.target}</targetJdk>
             </configuration>
           </plugin>
           <plugin>

Modified: logging/log4j/log4j2/trunk/jcl-bridge/src/test/java/org/apache/logging/log4j/jcl/LoggerTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/jcl-bridge/src/test/java/org/apache/logging/log4j/jcl/LoggerTest.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/jcl-bridge/src/test/java/org/apache/logging/log4j/jcl/LoggerTest.java (original)
+++ logging/log4j/log4j2/trunk/jcl-bridge/src/test/java/org/apache/logging/log4j/jcl/LoggerTest.java Sun Apr 28 01:27:27 2013
@@ -21,11 +21,10 @@ import org.apache.commons.logging.LogFac
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.core.Appender;
 import org.apache.logging.log4j.core.LoggerContext;
-import org.apache.logging.log4j.core.helpers.Constants;
-import org.apache.logging.log4j.test.appender.ListAppender;
-import org.apache.logging.log4j.core.config.Configuration;
 import org.apache.logging.log4j.core.config.XMLConfigurationFactory;
+import org.apache.logging.log4j.core.helpers.Constants;
 import org.apache.logging.log4j.status.StatusLogger;
+import org.apache.logging.log4j.test.appender.ListAppender;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -33,9 +32,7 @@ import org.junit.Test;
 import java.util.List;
 import java.util.Map;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 /**
  *
@@ -48,7 +45,7 @@ public class LoggerTest {
     public static void setupClass() {
         System.setProperty(XMLConfigurationFactory.CONFIGURATION_FILE_PROPERTY, CONFIG);
         final LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
-        final Configuration config = ctx.getConfiguration();
+        ctx.getConfiguration();
     }
 
     @AfterClass
@@ -73,13 +70,14 @@ public class LoggerTest {
         verify("List", "o.a.l.l.j.LoggerTest Info Message {} MDC{}" + Constants.LINE_SEP);
     }
 
+    @SuppressWarnings("unchecked")
     private void verify(final String name, final String expected) {
         final LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
         final Map<String, Appender<?>> list = ctx.getConfiguration().getAppenders();
         final Appender<?> listApp = list.get(name);
         assertNotNull("Missing Appender", listApp);
         assertTrue("Not a ListAppender", listApp instanceof ListAppender);
-        final List<String> events = ((ListAppender) listApp).getMessages();
+        final List<String> events = ((ListAppender<String>) listApp).getMessages();
         assertTrue("Incorrect number of messages. Expected 1 Actual " + events.size(), events.size()== 1);
         final String actual = events.get(0);
         assertEquals("Incorrect message. Expected " + expected + ". Actual " + actual, expected, actual);

Modified: logging/log4j/log4j2/trunk/log4j-to-slf4j/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-to-slf4j/pom.xml?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-to-slf4j/pom.xml (original)
+++ logging/log4j/log4j2/trunk/log4j-to-slf4j/pom.xml Sun Apr 28 01:27:27 2013
@@ -23,7 +23,6 @@
     <version>2.0-beta6-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
-  <groupId>org.apache.logging.log4j</groupId>
   <artifactId>log4j-to-slf4j</artifactId>
   <packaging>jar</packaging>
   <name>Apache Log4j to SLF4J Adapter</name>
@@ -167,7 +166,7 @@
             <artifactId>maven-pmd-plugin</artifactId>
             <version>${pmd.plugin.version}</version>
             <configuration>
-              <targetJdk>1.5</targetJdk>
+              <targetJdk>${maven.compile.target}</targetJdk>
             </configuration>
           </plugin>
           <plugin>

Modified: logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/MDCContextMap.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/MDCContextMap.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/MDCContextMap.java (original)
+++ logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/MDCContextMap.java Sun Apr 28 01:27:27 2013
@@ -25,34 +25,44 @@ import java.util.Map;
  * Bind the ThreadContextMap to the SLF4J MDC.
  */
 public class MDCContextMap implements ThreadContextMap {
+    @Override
     public void put(final String key, final String value) {
         MDC.put(key, value);
     }
 
+    @Override
     public String get(final String key) {
         return MDC.get(key);
     }
 
+    @Override
     public void remove(final String key) {
         MDC.remove(key);
     }
 
+    @Override
     public void clear() {
         MDC.clear();
     }
 
+    @Override
     public boolean containsKey(final String key) {
         return MDC.getCopyOfContextMap().containsKey(key);
     }
 
+    @Override
+    @SuppressWarnings("unchecked") // nothing we can do about this, restricted by SLF4J API
     public Map<String, String> getContext() {
         return MDC.getCopyOfContextMap();
     }
 
+    @Override
+    @SuppressWarnings("unchecked") // nothing we can do about this, restricted by SLF4J API
     public Map<String, String> get() {
         return MDC.getCopyOfContextMap();
     }
 
+    @Override
     public boolean isEmpty() {
         return MDC.getCopyOfContextMap().isEmpty();
     }

Modified: logging/log4j/log4j2/trunk/log4j12-api/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j12-api/pom.xml?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j12-api/pom.xml (original)
+++ logging/log4j/log4j2/trunk/log4j12-api/pom.xml Sun Apr 28 01:27:27 2013
@@ -158,7 +158,7 @@
             <artifactId>maven-pmd-plugin</artifactId>
             <version>${pmd.plugin.version}</version>
             <configuration>
-              <targetJdk>1.5</targetJdk>
+              <targetJdk>${maven.compile.target}</targetJdk>
             </configuration>
           </plugin>
           <plugin>

Modified: logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/MDC.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/MDC.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/MDC.java (original)
+++ logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/MDC.java Sun Apr 28 01:27:27 2013
@@ -71,7 +71,7 @@ public final class MDC {
         ThreadContext.clear();
     }
 
-    public static Hashtable getContext() {
-        return new Hashtable(localMap.get());
+    public static Hashtable<String, Object> getContext() {
+        return new Hashtable<String, Object>(localMap.get());
     }
 }

Modified: logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/NDC.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/NDC.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/NDC.java (original)
+++ logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/NDC.java Sun Apr 28 01:27:27 2013
@@ -80,7 +80,7 @@ public final class NDC {
      *
      * @param stack The diagnostic context of the parent thread.
      */
-    public static void inherit(final Stack stack) {
+    public static void inherit(final Stack<String> stack) {
         org.apache.logging.log4j.ThreadContext.setStack(stack);
     }
 
@@ -153,7 +153,7 @@ public final class NDC {
      * method is called before exiting a thread, this method has been
      * augmented to lazily remove references to dead threads. In
      * practice, this means that you can be a little sloppy and
-     * occasionally forget to call {@link #remove} before exiting a
+     * occasionally forget to call {@code remove} before exiting a
      * thread. However, you must call <code>remove</code> sometime. If
      * you never call it, then your application is sure to run out of
      * memory.

Modified: logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/CategoryTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/CategoryTest.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/CategoryTest.java (original)
+++ logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/CategoryTest.java Sun Apr 28 01:27:27 2013
@@ -20,24 +20,21 @@ package org.apache.log4j;
 import org.apache.logging.log4j.core.Layout;
 import org.apache.logging.log4j.core.LogEvent;
 import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.config.ConfigurationFactory;
 import org.apache.logging.log4j.core.helpers.Constants;
+import org.apache.logging.log4j.core.layout.PatternLayout;
 import org.apache.logging.log4j.message.Message;
 import org.apache.logging.log4j.message.ObjectMessage;
 import org.apache.logging.log4j.test.appender.ListAppender;
-import org.apache.logging.log4j.core.config.ConfigurationFactory;
-import org.apache.logging.log4j.core.layout.PatternLayout;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
 import java.lang.reflect.Method;
 import java.util.List;
 
+import static org.junit.Assert.*;
+
 
 /**
  * Tests of Category.
@@ -46,7 +43,7 @@ public class CategoryTest {
 
     static ConfigurationFactory cf = new BasicConfigurationFactory();
 
-    private static ListAppender appender = new ListAppender("List");
+    private static ListAppender<LogEvent> appender = new ListAppender<LogEvent>("List");
 
     @BeforeClass
     public static void setupClass() {
@@ -66,6 +63,7 @@ public class CategoryTest {
      * Tests Category.forcedLog.
      */
     @Test
+    @SuppressWarnings("deprecation")
     public void testForcedLog() {
         final MockCategory category = new MockCategory("org.example.foo");
         category.setAdditivity(false);
@@ -163,8 +161,8 @@ public class CategoryTest {
     @Test
     public void testClassName() {
         final Category category = Category.getInstance("TestCategory");
-        final Layout layout = PatternLayout.createLayout("%d %p %C{1.} [%t] %m%n", null, null, null);
-        final ListAppender appender = new ListAppender("List2", null, layout, false, false);
+        final Layout<String> layout = PatternLayout.createLayout("%d %p %C{1.} [%t] %m%n", null, null, null);
+        final ListAppender<String> appender = new ListAppender<String>("List2", null, layout, false, false);
         appender.start();
         category.setAdditivity(false);
         category.getLogger().addAppender(appender);

Modified: logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggerTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggerTest.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggerTest.java (original)
+++ logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggerTest.java Sun Apr 28 01:27:27 2013
@@ -18,36 +18,29 @@
 package org.apache.log4j;
 
 import org.apache.logging.log4j.core.Appender;
-
-import java.util.List;
-import java.util.Locale;
-import java.util.ResourceBundle;
-
 import org.apache.logging.log4j.core.LogEvent;
 import org.apache.logging.log4j.core.LoggerContext;
 import org.apache.logging.log4j.core.appender.AbstractAppender;
+import org.apache.logging.log4j.core.config.ConfigurationFactory;
 import org.apache.logging.log4j.core.layout.PatternLayout;
 import org.apache.logging.log4j.test.appender.ListAppender;
-import org.apache.logging.log4j.core.config.ConfigurationFactory;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.io.Serializable;
+import java.util.List;
+import java.util.Locale;
+import java.util.ResourceBundle;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertSame;
+import static org.junit.Assert.*;
 
 /**
  * Used for internal unit testing the Logger class.
  */
 public class LoggerTest {
 
-    Logger logger;
     Appender a1;
     Appender a2;
 
@@ -126,7 +119,7 @@ public class LoggerTest {
     public void testAdditivity1() {
         final Logger a = Logger.getLogger("a");
         final Logger ab = Logger.getLogger("a.b");
-        final CountingAppender ca = new CountingAppender();
+        final CountingAppender<LogEvent> ca = new CountingAppender<LogEvent>();
         ca.start();
         a.getLogger().addAppender(ca);
 
@@ -154,9 +147,9 @@ public class LoggerTest {
         final Logger abc = Logger.getLogger("a.b.c");
         final Logger x = Logger.getLogger("x");
 
-        final CountingAppender ca1 = new CountingAppender();
+        final CountingAppender<LogEvent> ca1 = new CountingAppender<LogEvent>();
         ca1.start();
-        final CountingAppender ca2 = new CountingAppender();
+        final CountingAppender<LogEvent> ca2 = new CountingAppender<LogEvent>();
         ca2.start();
 
         a.getLogger().addAppender(ca1);
@@ -192,13 +185,13 @@ public class LoggerTest {
         final Logger a = Logger.getLogger("a");
         final Logger ab = Logger.getLogger("a.b");
         final Logger abc = Logger.getLogger("a.b.c");
-        final Logger x = Logger.getLogger("x");
+        Logger.getLogger("x");
 
-        final CountingAppender caRoot = new CountingAppender();
+        final CountingAppender<LogEvent> caRoot = new CountingAppender<LogEvent>();
         caRoot.start();
-        final CountingAppender caA = new CountingAppender();
+        final CountingAppender<LogEvent> caA = new CountingAppender<LogEvent>();
         caA.start();
-        final CountingAppender caABC = new CountingAppender();
+        final CountingAppender<LogEvent> caABC = new CountingAppender<LogEvent>();
         caABC.start();
 
         root.getLogger().addAppender(caRoot);
@@ -391,7 +384,7 @@ public class LoggerTest {
      */
     @Test
     public void testTrace() {
-        final ListAppender appender = new ListAppender("List");
+        final ListAppender<LogEvent> appender = new ListAppender<LogEvent>("List");
         appender.start();
         final Logger root = Logger.getRootLogger();
         root.getLogger().addAppender(appender);
@@ -418,7 +411,7 @@ public class LoggerTest {
      */
     @Test
     public void testTraceWithException() {
-        final ListAppender appender = new ListAppender("List");
+        final ListAppender<LogEvent> appender = new ListAppender<LogEvent>("List");
         appender.start();
         final Logger root = Logger.getRootLogger();
         root.getLogger().addAppender(appender);
@@ -446,7 +439,7 @@ public class LoggerTest {
      */
     @Test
     public void testIsTraceEnabled() {
-        final ListAppender appender = new ListAppender("List");
+        final ListAppender<LogEvent> appender = new ListAppender<LogEvent>("List");
         appender.start();
         final Logger root = Logger.getRootLogger();
         root.getLogger().addAppender(appender);
@@ -462,9 +455,10 @@ public class LoggerTest {
     }
 
     @Test
+    @SuppressWarnings("deprecation")
     public void testLog() {
         final PatternLayout layout = PatternLayout.createLayout("%d %C %L %m", null, null, null);
-        final ListAppender appender = new ListAppender("List", null, layout, false, false);
+        final ListAppender<String> appender = new ListAppender<String>("List", null, layout, false, false);
         appender.start();
         final Logger root = Logger.getRootLogger();
         root.getLogger().addAppender(appender);
@@ -489,12 +483,13 @@ public class LoggerTest {
             this.logger = logger;
         }
 
+        @SuppressWarnings("deprecation")
         public void logInfo(final String msg, final Throwable t) {
             logger.log(MyLogger.class.getName(), Priority.INFO, msg, t);
         }
     }
 
-    private static class CountingAppender extends AbstractAppender {
+    private static class CountingAppender<T extends Serializable> extends AbstractAppender<T> {
 
         int counter;
 
@@ -507,6 +502,7 @@ public class LoggerTest {
         public void close() {
         }
 
+        @Override
         public void append(final LogEvent event) {
             counter++;
         }

Modified: logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/PriorityTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/PriorityTest.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/PriorityTest.java (original)
+++ logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/PriorityTest.java Sun Apr 28 01:27:27 2013
@@ -17,13 +17,11 @@
 
 package org.apache.log4j;
 
-import java.util.Locale;
-
 import org.junit.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import java.util.Locale;
+
+import static org.junit.Assert.*;
 
 /**
  * Tests of Priority.
@@ -89,77 +87,63 @@ public class PriorityTest {
 
     /**
      * Tests Priority.FATAL.
-     *
-     * @deprecated
      */
-    @Deprecated
     @Test
+    @SuppressWarnings("deprecation")
     public void testFatal() {
         assertTrue(Priority.FATAL instanceof Level);
     }
 
     /**
      * Tests Priority.ERROR.
-     *
-     * @deprecated
      */
-    @Deprecated
     @Test
+    @SuppressWarnings("deprecation")
     public void testERROR() {
         assertTrue(Priority.ERROR instanceof Level);
     }
 
     /**
      * Tests Priority.WARN.
-     *
-     * @deprecated
      */
-    @Deprecated
     @Test
+    @SuppressWarnings("deprecation")
     public void testWARN() {
         assertTrue(Priority.WARN instanceof Level);
     }
 
     /**
      * Tests Priority.INFO.
-     *
-     * @deprecated
      */
-    @Deprecated
     @Test
+    @SuppressWarnings("deprecation")
     public void testINFO() {
         assertTrue(Priority.INFO instanceof Level);
     }
 
     /**
      * Tests Priority.DEBUG.
-     *
-     * @deprecated
      */
-    @Deprecated
     @Test
+    @SuppressWarnings("deprecation")
     public void testDEBUG() {
         assertTrue(Priority.DEBUG instanceof Level);
     }
 
     /**
      * Tests Priority.equals(null).
-     *
-     * @deprecated
      */
-    @Deprecated
     @Test
+    @SuppressWarnings("deprecation")
     public void testEqualsNull() {
         assertFalse(Priority.DEBUG.equals(null));
     }
 
     /**
      * Tests Priority.equals(Level.DEBUG).
-     *
-     * @deprecated
      */
-    @Deprecated
     @Test
+    @SuppressWarnings("deprecation")
     public void testEqualsLevel() {
         //
         //   this behavior violates the equals contract.
@@ -169,11 +153,9 @@ public class PriorityTest {
 
     /**
      * Tests getAllPossiblePriorities().
-     *
-     * @deprecated
      */
-    @Deprecated
     @Test
+    @SuppressWarnings("deprecation")
     public void testGetAllPossiblePriorities() {
         final Priority[] priorities = Priority.getAllPossiblePriorities();
         assertEquals(5, priorities.length);
@@ -181,55 +163,45 @@ public class PriorityTest {
 
     /**
      * Tests toPriority(String).
-     *
-     * @deprecated
      */
-    @Deprecated
     @Test
+    @SuppressWarnings("deprecation")
     public void testToPriorityString() {
         assertTrue(Priority.toPriority("DEBUG") == Level.DEBUG);
     }
 
     /**
      * Tests toPriority(int).
-     *
-     * @deprecated
      */
-    @Deprecated
     @Test
+    @SuppressWarnings("deprecation")
     public void testToPriorityInt() {
         assertTrue(Priority.toPriority(Priority.DEBUG_INT) == Level.DEBUG);
     }
 
     /**
      * Tests toPriority(String, Priority).
-     *
-     * @deprecated
      */
-    @Deprecated
     @Test
+    @SuppressWarnings("deprecation")
     public void testToPriorityStringPriority() {
         assertTrue(Priority.toPriority("foo", Priority.DEBUG) == Priority.DEBUG);
     }
 
     /**
      * Tests toPriority(int, Priority).
-     *
-     * @deprecated
      */
-    @Deprecated
     @Test
+    @SuppressWarnings("deprecation")
     public void testToPriorityIntPriority() {
         assertTrue(Priority.toPriority(17, Priority.DEBUG) == Priority.DEBUG);
     }
 
     /**
      * Test that dotless lower I + "nfo" is recognized as INFO.
-     *
-     * @deprecated
      */
-    @Deprecated
     @Test
+    @SuppressWarnings("deprecation")
     public void testDotlessLowerI() {
         final Priority level = Priority.toPriority("\u0131nfo");
         assertEquals("INFO", level.toString());
@@ -238,11 +210,9 @@ public class PriorityTest {
     /**
      * Test that dotted lower I + "nfo" is recognized as INFO
      * even in Turkish locale.
-     *
-     * @deprecated
      */
-    @Deprecated
     @Test
+    @SuppressWarnings("deprecation")
     public void testDottedLowerI() {
         final Locale defaultLocale = Locale.getDefault();
         final Locale turkey = new Locale("tr", "TR");

Modified: logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java (original)
+++ logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java Sun Apr 28 01:27:27 2013
@@ -32,16 +32,13 @@ import java.lang.reflect.Proxy;
  */
 public class LogEventFactory {
 
-    public static <T> T getEvent(final Class<T> intrface) {
-
-        final Class<?>[] interfaces = new Class<?>[]{intrface};
+    @SuppressWarnings("unchecked")
+    public static <T extends AuditEvent> T getEvent(final Class<T> intrface) {
 
         final String eventId = NamingUtils.lowerFirst(intrface.getSimpleName());
         final StructuredDataMessage msg = new StructuredDataMessage(eventId, null, "Audit");
-        final AuditEvent audit = (AuditEvent) Proxy.newProxyInstance(intrface
-            .getClassLoader(), interfaces, new AuditProxy(msg, intrface));
-
-        return (T) audit;
+        return (T)Proxy.newProxyInstance(intrface
+            .getClassLoader(), new Class<?>[]{intrface}, new AuditProxy(msg, intrface));
     }
 
     private static class AuditProxy implements InvocationHandler {

Modified: logging/log4j/log4j2/trunk/slf4j-impl/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/slf4j-impl/pom.xml?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/slf4j-impl/pom.xml (original)
+++ logging/log4j/log4j2/trunk/slf4j-impl/pom.xml Sun Apr 28 01:27:27 2013
@@ -166,7 +166,7 @@
             <artifactId>maven-pmd-plugin</artifactId>
             <version>${pmd.plugin.version}</version>
             <configuration>
-              <targetJdk>1.5</targetJdk>
+              <targetJdk>${maven.compile.target}</targetJdk>
             </configuration>
           </plugin>
           <plugin>

Modified: logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/Log4JLoggerFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/Log4JLoggerFactory.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/Log4JLoggerFactory.java (original)
+++ logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/Log4JLoggerFactory.java Sun Apr 28 01:27:27 2013
@@ -41,6 +41,7 @@ public class Log4JLoggerFactory implemen
     private final Map<LoggerContext, ConcurrentMap<String, Logger>> contextMap =
         new WeakHashMap<LoggerContext, ConcurrentMap<String, Logger>>();
 
+    @Override
     public Logger getLogger(final String name) {
         final LoggerContext context = getContext();
         final ConcurrentMap<String, Logger> loggers = getLoggersMap(context);

Modified: logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/Log4JMDCAdapter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/Log4JMDCAdapter.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/Log4JMDCAdapter.java (original)
+++ logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/Log4JMDCAdapter.java Sun Apr 28 01:27:27 2013
@@ -26,26 +26,33 @@ import java.util.Map;
  */
 public class Log4JMDCAdapter implements MDCAdapter {
 
+    @Override
     public void put(final String key, final String val) {
         ThreadContext.put(key, val);
     }
 
+    @Override
     public String get(final String key) {
         return ThreadContext.get(key);
     }
 
+    @Override
     public void remove(final String key) {
         ThreadContext.remove(key);
     }
 
+    @Override
     public void clear() {
         ThreadContext.clear();
     }
 
+    @Override
     public Map<String, String> getCopyOfContextMap() {
         return ThreadContext.getContext();
     }
 
+    @Override
+    @SuppressWarnings("unchecked") // nothing we can do about this, restricted by SLF4J API
     public void setContextMap(final Map map) {
         ThreadContext.clear();
         for (final Map.Entry<String, String> entry : ((Map<String, String>) map).entrySet()) {

Modified: logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/Log4JMarkerFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/Log4JMarkerFactory.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/Log4JMarkerFactory.java (original)
+++ logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/Log4JMarkerFactory.java Sun Apr 28 01:27:27 2013
@@ -29,25 +29,31 @@ public class Log4JMarkerFactory implemen
 
     private final ConcurrentMap<String, Marker> markerMap = new ConcurrentHashMap<String, Marker>();
 
+    @Override
     public Marker getMarker(final String name) {
         if (name == null) {
             throw new IllegalArgumentException("Marker name must not be null");
         }
         Marker marker = markerMap.get(name);
-        if (marker == null) {
-            marker = new MarkerWrapper(name);
+        if (marker != null) {
+            return marker;
         }
-        return marker;
+        marker = new MarkerWrapper(name);
+        Marker existing = markerMap.putIfAbsent(name, marker);
+        return existing == null ? marker : existing;
     }
 
+    @Override
     public boolean exists(final String name) {
         return markerMap.containsKey(name);
     }
 
+    @Override
     public boolean detachMarker(final String name) {
         return false;
     }
 
+    @Override
     public Marker getDetachedMarker(final String name) {
         return new MarkerWrapper(name);
     }

Modified: logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/MarkerWrapper.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/MarkerWrapper.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/MarkerWrapper.java (original)
+++ logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/MarkerWrapper.java Sun Apr 28 01:27:27 2013
@@ -40,10 +40,12 @@ public class MarkerWrapper extends Basic
         parent = marker;
     }
 
+    @Override
     public org.apache.logging.log4j.Marker getParent() {
         return this.parent;
     }
 
+    @Override
     public boolean isInstanceOf(final org.apache.logging.log4j.Marker marker) {
         if (marker == null) {
             throw new IllegalArgumentException("A marker parameter is required");
@@ -56,6 +58,7 @@ public class MarkerWrapper extends Basic
         }
     }
 
+    @Override
     public boolean isInstanceOf(final String name) {
         if (name == null) {
             throw new IllegalArgumentException("A marker name is required");

Modified: logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/impl/SLF4JLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/impl/SLF4JLogger.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/impl/SLF4JLogger.java (original)
+++ logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/impl/SLF4JLogger.java Sun Apr 28 01:27:27 2013
@@ -17,8 +17,6 @@
 package org.slf4j.impl;
 
 import org.apache.logging.log4j.Level;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.message.Message;
 import org.apache.logging.log4j.message.ParameterizedMessage;
 import org.apache.logging.log4j.message.SimpleMessage;
@@ -44,24 +42,26 @@ public class SLF4JLogger implements Loca
     private final String name;
 
     public SLF4JLogger(final AbstractLogger logger, final String name) {
-        final Logger l = LogManager.getLogger(name);
         this.logger = new AbstractLoggerWrapper(logger, name, null);
         eventLogger = "EventLogger".equals(name);
         this.name = name;
     }
 
+    @Override
     public void trace(final String format) {
         if (logger.isTraceEnabled()) {
             logger.log(null, FQCN, Level.TRACE, new SimpleMessage(format), null);
         }
     }
 
+    @Override
     public void trace(final String format, final Object o) {
         if (logger.isTraceEnabled()) {
             logger.log(null, FQCN, Level.TRACE, new ParameterizedMessage(format, o), null);
         }
     }
 
+    @Override
     public void trace(final String format, final Object arg1, final Object arg2) {
         if (logger.isTraceEnabled()) {
             final ParameterizedMessage msg = new ParameterizedMessage(format, arg1, arg2);
@@ -69,33 +69,39 @@ public class SLF4JLogger implements Loca
         }
     }
 
-    public void trace(final String format, final Object[] args) {
+    @Override
+    public void trace(final String format, final Object... args) {
         if (logger.isTraceEnabled()) {
             final ParameterizedMessage msg = new ParameterizedMessage(format, args);
             logger.log(null, FQCN, Level.TRACE, msg, msg.getThrowable());
         }
     }
 
+    @Override
     public void trace(final String format, final Throwable t) {
         if (logger.isTraceEnabled()) {
             logger.log(null, FQCN, Level.TRACE, new SimpleMessage(format), t);
         }
     }
 
+    @Override
     public boolean isTraceEnabled() {
         return logger.isTraceEnabled();
     }
 
+    @Override
     public boolean isTraceEnabled(final Marker marker) {
         return logger.isTraceEnabled((org.apache.logging.log4j.Marker) marker);
     }
 
+    @Override
     public void trace(final Marker marker, final String s) {
         if (isTraceEnabled(marker)) {
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.TRACE, new SimpleMessage(s), null);
         }
     }
 
+    @Override
     public void trace(final Marker marker, final String s, final Object o) {
         if (isTraceEnabled(marker)) {
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.TRACE,
@@ -103,6 +109,7 @@ public class SLF4JLogger implements Loca
         }
     }
 
+    @Override
     public void trace(final Marker marker, final String s, final Object o, final Object o1) {
         if (isTraceEnabled(marker)) {
             final ParameterizedMessage msg = new ParameterizedMessage(s, o, o1);
@@ -110,13 +117,15 @@ public class SLF4JLogger implements Loca
         }
     }
 
-    public void trace(final Marker marker, final String s, final Object[] objects) {
+    @Override
+    public void trace(final Marker marker, final String s, final Object... objects) {
         if (isTraceEnabled(marker)) {
             final ParameterizedMessage msg = new ParameterizedMessage(s, objects);
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.TRACE, msg, msg.getThrowable());
         }
     }
 
+    @Override
     public void trace(final Marker marker, final String s, final Throwable throwable) {
         if (isTraceEnabled(marker)) {
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.TRACE,
@@ -124,18 +133,21 @@ public class SLF4JLogger implements Loca
         }
     }
 
+    @Override
     public void debug(final String format) {
         if (logger.isDebugEnabled()) {
             logger.log(null, FQCN, Level.DEBUG, new SimpleMessage(format), null);
         }
     }
 
+    @Override
     public void debug(final String format, final Object o) {
         if (logger.isDebugEnabled()) {
             logger.log(null, FQCN, Level.DEBUG, new ParameterizedMessage(format, o), null);
         }
     }
 
+    @Override
     public void debug(final String format, final Object arg1, final Object arg2) {
         if (logger.isDebugEnabled()) {
             final ParameterizedMessage msg = new ParameterizedMessage(format, arg1, arg2);
@@ -143,33 +155,39 @@ public class SLF4JLogger implements Loca
         }
     }
 
-    public void debug(final String format, final Object[] args) {
+    @Override
+    public void debug(final String format, final Object... args) {
         if (logger.isDebugEnabled()) {
             final ParameterizedMessage msg = new ParameterizedMessage(format, args);
             logger.log(null, FQCN, Level.DEBUG, msg, msg.getThrowable());
         }
     }
 
+    @Override
     public void debug(final String format, final Throwable t) {
         if (logger.isDebugEnabled()) {
             logger.log(null, FQCN, Level.DEBUG, new SimpleMessage(format), t);
         }
     }
 
+    @Override
     public boolean isDebugEnabled() {
         return logger.isDebugEnabled();
     }
 
+    @Override
     public boolean isDebugEnabled(final Marker marker) {
         return logger.isDebugEnabled((org.apache.logging.log4j.Marker) marker);
     }
 
+    @Override
     public void debug(final Marker marker, final String s) {
         if (isDebugEnabled(marker)) {
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.DEBUG, new SimpleMessage(s), null);
         }
     }
 
+    @Override
     public void debug(final Marker marker, final String s, final Object o) {
         if (isDebugEnabled(marker)) {
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.DEBUG,
@@ -177,6 +195,7 @@ public class SLF4JLogger implements Loca
         }
     }
 
+    @Override
     public void debug(final Marker marker, final String s, final Object o, final Object o1) {
         if (isDebugEnabled(marker)) {
             final ParameterizedMessage msg = new ParameterizedMessage(s, o, o1);
@@ -184,13 +203,15 @@ public class SLF4JLogger implements Loca
         }
     }
 
-    public void debug(final Marker marker, final String s, final Object[] objects) {
+    @Override
+    public void debug(final Marker marker, final String s, final Object... objects) {
         if (isDebugEnabled(marker)) {
             final ParameterizedMessage msg = new ParameterizedMessage(s, objects);
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.DEBUG, msg, msg.getThrowable());
         }
     }
 
+    @Override
     public void debug(final Marker marker, final String s, final Throwable throwable) {
         if (isDebugEnabled(marker)) {
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.DEBUG,
@@ -198,18 +219,21 @@ public class SLF4JLogger implements Loca
         }
     }
 
+    @Override
     public void info(final String format) {
         if (logger.isInfoEnabled()) {
             logger.log(null, FQCN, Level.INFO, new SimpleMessage(format), null);
         }
     }
 
+    @Override
     public void info(final String format, final Object o) {
         if (logger.isInfoEnabled()) {
             logger.log(null, FQCN, Level.INFO, new ParameterizedMessage(format, o), null);
         }
     }
 
+    @Override
     public void info(final String format, final Object arg1, final Object arg2) {
         if (logger.isInfoEnabled()) {
             final ParameterizedMessage msg = new ParameterizedMessage(format, arg1, arg2);
@@ -217,33 +241,39 @@ public class SLF4JLogger implements Loca
         }
     }
 
-    public void info(final String format, final Object[] args) {
+    @Override
+    public void info(final String format, final Object... args) {
         if (logger.isInfoEnabled()) {
             final ParameterizedMessage msg = new ParameterizedMessage(format, args);
             logger.log(null, FQCN, Level.INFO, msg, msg.getThrowable());
         }
     }
 
+    @Override
     public void info(final String format, final Throwable t) {
         if (logger.isInfoEnabled()) {
             logger.log(null, FQCN, Level.INFO, new SimpleMessage(format), t);
         }
     }
 
+    @Override
     public boolean isInfoEnabled() {
         return logger.isInfoEnabled();
     }
 
+    @Override
     public boolean isInfoEnabled(final Marker marker) {
         return logger.isInfoEnabled((org.apache.logging.log4j.Marker) marker);
     }
 
+    @Override
     public void info(final Marker marker, final String s) {
         if (isInfoEnabled(marker)) {
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.INFO, new SimpleMessage(s), null);
         }
     }
 
+    @Override
     public void info(final Marker marker, final String s, final Object o) {
         if (isInfoEnabled(marker)) {
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.INFO,
@@ -251,6 +281,7 @@ public class SLF4JLogger implements Loca
         }
     }
 
+    @Override
     public void info(final Marker marker, final String s, final Object o, final Object o1) {
         if (isInfoEnabled(marker)) {
             final ParameterizedMessage msg = new ParameterizedMessage(s, o, o1);
@@ -258,13 +289,15 @@ public class SLF4JLogger implements Loca
         }
     }
 
-    public void info(final Marker marker, final String s, final Object[] objects) {
+    @Override
+    public void info(final Marker marker, final String s, final Object... objects) {
         if (isInfoEnabled(marker)) {
             final ParameterizedMessage msg = new ParameterizedMessage(s, objects);
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.INFO, msg, msg.getThrowable());
         }
     }
 
+    @Override
     public void info(final Marker marker, final String s, final Throwable throwable) {
         if (isInfoEnabled(marker)) {
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.INFO,
@@ -272,18 +305,21 @@ public class SLF4JLogger implements Loca
         }
     }
 
+    @Override
     public void warn(final String format) {
         if (logger.isWarnEnabled()) {
             logger.log(null, FQCN, Level.WARN, new SimpleMessage(format), null);
         }
     }
 
+    @Override
     public void warn(final String format, final Object o) {
         if (logger.isWarnEnabled()) {
             logger.log(null, FQCN, Level.WARN, new ParameterizedMessage(format, o), null);
         }
     }
 
+    @Override
     public void warn(final String format, final Object arg1, final Object arg2) {
         if (logger.isWarnEnabled()) {
             final ParameterizedMessage msg = new ParameterizedMessage(format, arg1, arg2);
@@ -291,33 +327,39 @@ public class SLF4JLogger implements Loca
         }
     }
 
-    public void warn(final String format, final Object[] args) {
+    @Override
+    public void warn(final String format, final Object... args) {
         if (logger.isWarnEnabled()) {
             final ParameterizedMessage msg = new ParameterizedMessage(format, args);
             logger.log(null, FQCN, Level.WARN, msg, msg.getThrowable());
         }
     }
 
+    @Override
     public void warn(final String format, final Throwable t) {
         if (logger.isWarnEnabled()) {
             logger.log(null, FQCN, Level.WARN, new SimpleMessage(format), t);
         }
     }
 
+    @Override
     public boolean isWarnEnabled() {
         return logger.isWarnEnabled();
     }
 
+    @Override
     public boolean isWarnEnabled(final Marker marker) {
         return logger.isWarnEnabled((org.apache.logging.log4j.Marker) marker);
     }
 
+    @Override
     public void warn(final Marker marker, final String s) {
         if (isWarnEnabled(marker)) {
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.WARN, new SimpleMessage(s), null);
         }
     }
 
+    @Override
     public void warn(final Marker marker, final String s, final Object o) {
         if (isWarnEnabled(marker)) {
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.WARN,
@@ -325,6 +367,7 @@ public class SLF4JLogger implements Loca
         }
     }
 
+    @Override
     public void warn(final Marker marker, final String s, final Object o, final Object o1) {
         if (isWarnEnabled(marker)) {
             final ParameterizedMessage msg = new ParameterizedMessage(s, o, o1);
@@ -332,13 +375,15 @@ public class SLF4JLogger implements Loca
         }
     }
 
-    public void warn(final Marker marker, final String s, final Object[] objects) {
+    @Override
+    public void warn(final Marker marker, final String s, final Object... objects) {
         if (isWarnEnabled(marker)) {
             final ParameterizedMessage msg = new ParameterizedMessage(s, objects);
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.WARN, msg, msg.getThrowable());
         }
     }
 
+    @Override
     public void warn(final Marker marker, final String s, final Throwable throwable) {
         if (isWarnEnabled(marker)) {
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.WARN,
@@ -346,18 +391,21 @@ public class SLF4JLogger implements Loca
         }
     }
 
+    @Override
     public void error(final String format) {
         if (logger.isErrorEnabled()) {
             logger.log(null, FQCN, Level.ERROR, new SimpleMessage(format), null);
         }
     }
 
+    @Override
     public void error(final String format, final Object o) {
         if (logger.isErrorEnabled()) {
             logger.log(null, FQCN, Level.ERROR, new ParameterizedMessage(format, o), null);
         }
     }
 
+    @Override
     public void error(final String format, final Object arg1, final Object arg2) {
         if (logger.isErrorEnabled()) {
             final ParameterizedMessage msg = new ParameterizedMessage(format, arg1, arg2);
@@ -365,33 +413,39 @@ public class SLF4JLogger implements Loca
         }
     }
 
-    public void error(final String format, final Object[] args) {
+    @Override
+    public void error(final String format, final Object... args) {
         if (logger.isErrorEnabled()) {
             final ParameterizedMessage msg = new ParameterizedMessage(format, args);
             logger.log(null, FQCN, Level.ERROR, msg, msg.getThrowable());
         }
     }
 
+    @Override
     public void error(final String format, final Throwable t) {
         if (logger.isErrorEnabled()) {
             logger.log(null, FQCN, Level.ERROR, new SimpleMessage(format), t);
         }
     }
 
+    @Override
     public boolean isErrorEnabled() {
         return logger.isErrorEnabled();
     }
 
+    @Override
     public boolean isErrorEnabled(final Marker marker) {
         return logger.isErrorEnabled((org.apache.logging.log4j.Marker) marker);
     }
 
+    @Override
     public void error(final Marker marker, final String s) {
         if (isErrorEnabled(marker)) {
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.ERROR, new SimpleMessage(s), null);
         }
     }
 
+    @Override
     public void error(final Marker marker, final String s, final Object o) {
         if (isErrorEnabled(marker)) {
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.ERROR,
@@ -399,6 +453,7 @@ public class SLF4JLogger implements Loca
         }
     }
 
+    @Override
     public void error(final Marker marker, final String s, final Object o, final Object o1) {
         if (isErrorEnabled(marker)) {
             final ParameterizedMessage msg = new ParameterizedMessage(s, o, o1);
@@ -406,13 +461,15 @@ public class SLF4JLogger implements Loca
         }
     }
 
-    public void error(final Marker marker, final String s, final Object[] objects) {
+    @Override
+    public void error(final Marker marker, final String s, final Object... objects) {
         if (isErrorEnabled(marker)) {
             final ParameterizedMessage msg = new ParameterizedMessage(s, objects);
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.ERROR, msg, msg.getThrowable());
         }
     }
 
+    @Override
     public void error(final Marker marker, final String s, final Throwable throwable) {
         if (isErrorEnabled(marker)) {
             logger.log((org.apache.logging.log4j.Marker) marker, FQCN, Level.ERROR,
@@ -421,6 +478,7 @@ public class SLF4JLogger implements Loca
     }
 
 
+    @Override
     public void log(final Marker marker, final String fqcn, final int i, final String s1, final Object[] objects,
                     Throwable throwable) {
         if (!logger.isEnabled(getLevel(i), (org.apache.logging.log4j.Marker) marker, s1)) {
@@ -449,12 +507,13 @@ public class SLF4JLogger implements Loca
         } else {
             msg = new ParameterizedMessage(s1, objects, throwable);
             if (throwable != null) {
-                throwable = ((ParameterizedMessage) msg).getThrowable();
+                throwable = msg.getThrowable();
             }
         }
         logger.log((org.apache.logging.log4j.Marker) marker, fqcn, getLevel(i), msg, throwable);
     }
 
+    @Override
     public String getName() {
         return name;
     }

Modified: logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/impl/StaticLoggerBinder.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/impl/StaticLoggerBinder.java (original)
+++ logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/impl/StaticLoggerBinder.java Sun Apr 28 01:27:27 2013
@@ -65,6 +65,7 @@ public final class StaticLoggerBinder im
      * Returns the factory.
      * @return the factor.
      */
+    @Override
     public ILoggerFactory getLoggerFactory() {
         return loggerFactory;
     }
@@ -73,6 +74,7 @@ public final class StaticLoggerBinder im
      * Returns the class name.
      * @return the class name;
      */
+    @Override
     public String getLoggerFactoryClassStr() {
         return LOGGER_FACTORY_CLASS_STR;
     }

Modified: logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/impl/StaticMarkerBinder.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/impl/StaticMarkerBinder.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/impl/StaticMarkerBinder.java (original)
+++ logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/impl/StaticMarkerBinder.java Sun Apr 28 01:27:27 2013
@@ -32,10 +32,12 @@ public class StaticMarkerBinder implemen
 
     private final IMarkerFactory markerFactory = new Log4JMarkerFactory();
 
+    @Override
     public IMarkerFactory getMarkerFactory() {
         return markerFactory;
     }
 
+    @Override
     public String getMarkerFactoryClassStr() {
         return Log4JMarkerFactory.class.getName();
     }

Modified: logging/log4j/log4j2/trunk/slf4j-impl/src/test/java/org/apache/logging/slf4j/LoggerTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/slf4j-impl/src/test/java/org/apache/logging/slf4j/LoggerTest.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/slf4j-impl/src/test/java/org/apache/logging/slf4j/LoggerTest.java (original)
+++ logging/log4j/log4j2/trunk/slf4j-impl/src/test/java/org/apache/logging/slf4j/LoggerTest.java Sun Apr 28 01:27:27 2013
@@ -19,11 +19,10 @@ package org.apache.logging.slf4j;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.core.Appender;
 import org.apache.logging.log4j.core.LoggerContext;
-import org.apache.logging.log4j.core.helpers.Constants;
-import org.apache.logging.log4j.test.appender.ListAppender;
-import org.apache.logging.log4j.core.config.Configuration;
 import org.apache.logging.log4j.core.config.XMLConfigurationFactory;
+import org.apache.logging.log4j.core.helpers.Constants;
 import org.apache.logging.log4j.status.StatusLogger;
+import org.apache.logging.log4j.test.appender.ListAppender;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -42,9 +41,7 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 /**
  *
@@ -58,7 +55,7 @@ public class LoggerTest {
     public static void setupClass() {
         System.setProperty(XMLConfigurationFactory.CONFIGURATION_FILE_PROPERTY, CONFIG);
         ctx = (LoggerContext) LogManager.getContext(false);
-        final Configuration config = ctx.getConfiguration();
+        ctx.getConfiguration();
     }
 
     @AfterClass
@@ -170,13 +167,14 @@ public class LoggerTest {
         verify("EventLogger", "o.a.l.s.LoggerTest Transfer [Audit@18060 Amount=\"200.00\" FromAccount=\"123457\" ToAccount=\"123456\"] Transfer Complete" + Constants.LINE_SEP);
     }
 
+    @SuppressWarnings("unchecked")
     private void verify(final String name, final String expected) {
         //LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
         final Map<String, Appender<?>> list = ctx.getConfiguration().getAppenders();
         final Appender<?> listApp = list.get(name);
         assertNotNull("Missing Appender", listApp);
         assertTrue("Not a ListAppender", listApp instanceof ListAppender);
-        final List<String> events = ((ListAppender) listApp).getMessages();
+        final List<String> events = ((ListAppender<String>) listApp).getMessages();
         assertTrue("Incorrect number of messages. Expected 1 Actual " + events.size(), events.size()== 1);
         final String actual = events.get(0);
         assertEquals("Incorrect message. Expected " + expected + ". Actual " + actual, expected, actual);

Modified: logging/log4j/log4j2/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/changes/changes.xml?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/changes/changes.xml (original)
+++ logging/log4j/log4j2/trunk/src/changes/changes.xml Sun Apr 28 01:27:27 2013
@@ -23,6 +23,9 @@
 
   <body>
     <release version="2.0-beta6" date="@TBD@" description="Bug fixes and enhancements">
+      <action issue="LOG4J2-221" dev-"rgoers" type="fix" due-to="Nick Williams">
+        Remove hundreds of compiler warnings.
+      </action>
       <action issue="LOG4J2-215" dev="rpopma" type="fix">
         Various small documentation fixes.
       </action>

Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/api.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/api.xml?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/api.xml (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/api.xml Sun Apr 28 01:27:27 2013
@@ -78,7 +78,7 @@ public class HelloWorld {
             <p>
               Substituting parameters leaves formatting up to you if <code>toString()</code> is not what you want.
               To facilitate formatting, you can use the same format strings as Java's 
-              <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html#syntax">Formatter</a>.              
+              <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Formatter.html#syntax">Formatter</a>.
               For example:
             </p>
             <pre class="prettyprint linenums">public static Logger logger = LogManager.getFormatterLogger("Foo");

Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/thread-context.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/thread-context.xml?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/thread-context.xml (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/thread-context.xml Sun Apr 28 01:27:27 2013
@@ -99,7 +99,7 @@ ThreadContext.clear();</pre>
             <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/InheritableThreadLocal.html">InheritableThreadLocal</a>.
             Thus, in many cases the contents of the Stack and Map will be passed to child threads. However, as
             discussed in the
-            <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/Executors.html#privilegedThreadFactory()">Executors</a>
+            <a href="http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/Executors.html#privilegedThreadFactory()">Executors</a>
             class and in other cases where thread pooling is utilized, the ThreadContext may not always be
             automatically passed to worker threads. In those cases the pooling mechanism should provide a means for
             doing so. The getContext() and cloneStack() methods can be used to obtain copies of the Map and Stack

Modified: logging/log4j/log4j2/trunk/taglib/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/pom.xml?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/pom.xml (original)
+++ logging/log4j/log4j2/trunk/taglib/pom.xml Sun Apr 28 01:27:27 2013
@@ -189,7 +189,7 @@
         <artifactId>maven-pmd-plugin</artifactId>
         <version>${pmd.plugin.version}</version>
         <configuration>
-          <targetJdk>1.5</targetJdk>
+          <targetJdk>${maven.compile.target}</targetJdk>
         </configuration>
       </plugin>
       <plugin>

Modified: logging/log4j/log4j2/trunk/taglib/src/test/java/org/apache/logging/log4j/taglib/CatchingTagTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/test/java/org/apache/logging/log4j/taglib/CatchingTagTest.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/test/java/org/apache/logging/log4j/taglib/CatchingTagTest.java (original)
+++ logging/log4j/log4j2/trunk/taglib/src/test/java/org/apache/logging/log4j/taglib/CatchingTagTest.java Sun Apr 28 01:27:27 2013
@@ -95,13 +95,14 @@ public class CatchingTagTest {
         verify("catching WARN M-CATCHING[ EXCEPTION ] E java.lang.Error: This is the last test.");
     }
 
+    @SuppressWarnings("unchecked")
     private void verify(final String expected) {
         final LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
         final Map<String, Appender<?>> list = ctx.getConfiguration().getAppenders();
         final Appender<?> listApp = list.get("List");
         assertNotNull("Missing Appender", listApp);
         assertTrue("Not a ListAppender", listApp instanceof ListAppender);
-        final List<String> events = ((ListAppender) listApp).getMessages();
+        final List<String> events = ((ListAppender<String>) listApp).getMessages();
         try
         {
             assertEquals("Incorrect number of messages.", 1, events.size());

Modified: logging/log4j/log4j2/trunk/taglib/src/test/java/org/apache/logging/log4j/taglib/EntryTagTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/test/java/org/apache/logging/log4j/taglib/EntryTagTest.java?rev=1476703&r1=1476702&r2=1476703&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/test/java/org/apache/logging/log4j/taglib/EntryTagTest.java (original)
+++ logging/log4j/log4j2/trunk/taglib/src/test/java/org/apache/logging/log4j/taglib/EntryTagTest.java Sun Apr 28 01:27:27 2013
@@ -83,13 +83,14 @@ public class EntryTagTest {
         verify("entry params(log4j-test1.xml, 5792) TRACE M-ENTRY[ FLOW ] E");
     }
 
+    @SuppressWarnings("unchecked")
     private void verify(final String expected) {
         final LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
         final Map<String, Appender<?>> list = ctx.getConfiguration().getAppenders();
         final Appender<?> listApp = list.get("List");
         assertNotNull("Missing Appender", listApp);
         assertTrue("Not a ListAppender", listApp instanceof ListAppender);
-        final List<String> events = ((ListAppender) listApp).getMessages();
+        final List<String> events = ((ListAppender<String>) listApp).getMessages();
         try
         {
             assertEquals("Incorrect number of messages.", 1, events.size());



Mime
View raw message