logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpo...@apache.org
Subject svn commit: r1514231 [2/4] - in /logging/log4j/log4j2/trunk: api/src/main/java/org/apache/logging/log4j/util/ core/src/main/java/org/apache/logging/log4j/core/ core/src/main/java/org/apache/logging/log4j/core/appender/ core/src/main/java/org/apache/log...
Date Thu, 15 Aug 2013 10:47:35 GMT
Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManager.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManager.java Thu Aug 15 10:47:33 2013
@@ -20,6 +20,7 @@ import java.io.File;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.io.RandomAccessFile;
+import java.io.Serializable;
 import java.nio.ByteBuffer;
 
 import org.apache.logging.log4j.core.Layout;
@@ -45,7 +46,7 @@ public class RollingRandomAccessFileMana
             final String pattern, final OutputStream os, final boolean append,
             final boolean immediateFlush, final long size, final long time,
             final TriggeringPolicy policy, final RolloverStrategy strategy,
-            final String advertiseURI, final Layout layout) {
+            final String advertiseURI, final Layout<? extends Serializable> layout) {
         super(fileName, pattern, os, append, size, time, policy, strategy, advertiseURI, layout);
         this.isImmediateFlush = immediateFlush;
         this.randomAccessFile = raf;
@@ -57,7 +58,7 @@ public class RollingRandomAccessFileMana
 
     public static RollingRandomAccessFileManager getRollingRandomAccessFileManager(final String fileName, final String filePattern,
             final boolean isAppend, final boolean immediateFlush, final TriggeringPolicy policy,
-            final RolloverStrategy strategy, final String advertiseURI, final Layout layout) {
+            final RolloverStrategy strategy, final String advertiseURI, final Layout<? extends Serializable> layout) {
         return (RollingRandomAccessFileManager) getManager(fileName, new FactoryData(filePattern, isAppend, immediateFlush,
             policy, strategy, advertiseURI, layout), FACTORY);
     }
@@ -185,7 +186,7 @@ public class RollingRandomAccessFileMana
         private final TriggeringPolicy policy;
         private final RolloverStrategy strategy;
         private final String advertiseURI;
-        private final Layout layout;
+        private final Layout<? extends Serializable> layout;
 
         /**
          * Create the data for the factory.
@@ -196,7 +197,7 @@ public class RollingRandomAccessFileMana
          */
         public FactoryData(final String pattern, final boolean append, final boolean immediateFlush,
                            final TriggeringPolicy policy, final RolloverStrategy strategy, final String advertiseURI,
-                           final Layout layout) {
+                           final Layout<? extends Serializable> layout) {
             this.pattern = pattern;
             this.append = append;
             this.immediateFlush = immediateFlush;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/routing/RoutingAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/routing/RoutingAppender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/routing/RoutingAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/routing/RoutingAppender.java Thu Aug 15 10:47:33 2013
@@ -43,17 +43,15 @@ import org.apache.logging.log4j.core.hel
  * the Routing appender declaration. The pattern should contain one or more substitution patterns of
  * the form "$${[key:]token}". The pattern will be resolved each time the Appender is called using
  * the built in StrSubstitutor and the StrLookup plugin that matches the specified key.
- *
- * @param <T> The {@link org.apache.logging.log4j.core.Layout}'s {@link Serializable} type.
  */
 @Plugin(name = "Routing", category = "Core", elementType = "appender", printObject = true)
-public final class RoutingAppender<T extends Serializable> extends AbstractAppender<T> {
+public final class RoutingAppender extends AbstractAppender {
     private static final String DEFAULT_KEY = "ROUTING_APPENDER_DEFAULT";
     private final Routes routes;
     private final Route defaultRoute;
     private final Configuration config;
-    private final ConcurrentMap<String, AppenderControl<T>> appenders =
-            new ConcurrentHashMap<String, AppenderControl<T>>();
+    private final ConcurrentMap<String, AppenderControl> appenders =
+            new ConcurrentHashMap<String, AppenderControl>();
     private final RewritePolicy rewritePolicy;
 
     private RoutingAppender(final String name, final Filter filter, final boolean ignoreExceptions, final Routes routes,
@@ -76,13 +74,12 @@ public final class RoutingAppender<T ext
     }
 
     @Override
-    @SuppressWarnings("unchecked")
     public void start() {
-        final Map<String, Appender<?>> map = config.getAppenders();
+        final Map<String, Appender> map = config.getAppenders();
         // Register all the static routes.
         for (final Route route : routes.getRoutes()) {
             if (route.getAppenderRef() != null) {
-                final Appender<?> appender = map.get(route.getAppenderRef());
+                final Appender appender = map.get(route.getAppenderRef());
                 if (appender != null) {
                     final String key = route == defaultRoute ? DEFAULT_KEY : route.getKey();
                     appenders.put(key, new AppenderControl(appender, null, null));
@@ -97,8 +94,8 @@ public final class RoutingAppender<T ext
     @Override
     public void stop() {
         super.stop();
-        final Map<String, Appender<?>> map = config.getAppenders();
-        for (final Map.Entry<String, AppenderControl<T>> entry : appenders.entrySet()) {
+        final Map<String, Appender> map = config.getAppenders();
+        for (final Map.Entry<String, AppenderControl> entry : appenders.entrySet()) {
             final String name = entry.getValue().getAppender().getName();
             if (!map.containsKey(name)) {
                 entry.getValue().getAppender().stop();
@@ -112,14 +109,14 @@ public final class RoutingAppender<T ext
             event = rewritePolicy.rewrite(event);
         }
         final String key = config.getSubst().replace(event, routes.getPattern());
-        final AppenderControl<T> control = getControl(key, event);
+        final AppenderControl control = getControl(key, event);
         if (control != null) {
             control.callAppender(event);
         }
     }
 
-    private synchronized AppenderControl<T> getControl(final String key, final LogEvent event) {
-        AppenderControl<T> control = appenders.get(key);
+    private synchronized AppenderControl getControl(final String key, final LogEvent event) {
+        AppenderControl control = appenders.get(key);
         if (control != null) {
             return control;
         }
@@ -138,26 +135,25 @@ public final class RoutingAppender<T ext
             }
         }
         if (route != null) {
-            final Appender<T> app = createAppender(route, event);
+            final Appender app = createAppender(route, event);
             if (app == null) {
                 return null;
             }
-            control = new AppenderControl<T>(app, null, null);
+            control = new AppenderControl(app, null, null);
             appenders.put(key, control);
         }
 
         return control;
     }
 
-    private Appender<T> createAppender(final Route route, final LogEvent event) {
+    private Appender createAppender(final Route route, final LogEvent event) {
         final Node routeNode = route.getNode();
         for (final Node node : routeNode.getChildren()) {
             if (node.getType().getElementName().equals("appender")) {
                 final Node appNode = new Node(node);
                 config.createConfiguration(appNode, event);
                 if (appNode.getObject() instanceof Appender) {
-                    @SuppressWarnings("unchecked")
-                    final Appender<T> app = (Appender<T>) appNode.getObject();
+                    final Appender app = (Appender) appNode.getObject();
                     app.start();
                     return app;
                 }
@@ -178,11 +174,10 @@ public final class RoutingAppender<T ext
      * @param config The Configuration (automatically added by the Configuration).
      * @param rewritePolicy A RewritePolicy, if any.
      * @param filter A Filter to restrict events processed by the Appender or null.
-     * @param <S> The {@link org.apache.logging.log4j.core.Layout}'s {@link Serializable} type.
      * @return The RoutingAppender
      */
     @PluginFactory
-    public static <S extends Serializable> RoutingAppender<S> createAppender(@PluginAttr("name") final String name,
+    public static RoutingAppender createAppender(@PluginAttr("name") final String name,
                                           @PluginAttr("ignoreExceptions") final String ignore,
                                           @PluginElement("Routes") final Routes routes,
                                           @PluginConfiguration final Configuration config,
@@ -198,6 +193,6 @@ public final class RoutingAppender<T ext
             LOGGER.error("No routes defined for RoutingAppender");
             return null;
         }
-        return new RoutingAppender<S>(name, filter, ignoreExceptions, routes, rewritePolicy, config);
+        return new RoutingAppender(name, filter, ignoreExceptions, routes, rewritePolicy, config);
     }
 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/AppenderControl.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/AppenderControl.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/AppenderControl.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/AppenderControl.java Thu Aug 15 10:47:33 2013
@@ -16,8 +16,6 @@
  */
 package org.apache.logging.log4j.core.config;
 
-import java.io.Serializable;
-
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.core.Appender;
 import org.apache.logging.log4j.core.Filter;
@@ -28,13 +26,12 @@ import org.apache.logging.log4j.core.fil
 
 /**
  * Wraps an {@link Appender} with details an appender implementation shouldn't need to know about.
- * @param <T> The appender's Serializable type.
  */
-public class AppenderControl<T extends Serializable> extends AbstractFilterable {
+public class AppenderControl extends AbstractFilterable {
 
-    private final ThreadLocal<AppenderControl<T>> recursive = new ThreadLocal<AppenderControl<T>>();
+    private final ThreadLocal<AppenderControl> recursive = new ThreadLocal<AppenderControl>();
 
-    private final Appender<T> appender;
+    private final Appender appender;
 
     private final Level level;
 
@@ -46,7 +43,7 @@ public class AppenderControl<T extends S
      * @param level the Level to filter on.
      * @param filter the Filter(s) to apply.
      */
-    public AppenderControl(final Appender<T> appender, final Level level, final Filter filter) {
+    public AppenderControl(final Appender appender, final Level level, final Filter filter) {
         super(filter);
         this.appender = appender;
         this.level = level;
@@ -58,7 +55,7 @@ public class AppenderControl<T extends S
      * Returns the Appender.
      * @return the Appender.
      */
-    public Appender<T> getAppender() {
+    public Appender getAppender() {
         return appender;
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java Thu Aug 15 10:47:33 2013
@@ -93,7 +93,7 @@ public class BaseConfiguration extends A
 
     private String name;
 
-    private ConcurrentMap<String, Appender<?>> appenders = new ConcurrentHashMap<String, Appender<?>>();
+    private ConcurrentMap<String, Appender> appenders = new ConcurrentHashMap<String, Appender>();
 
     private ConcurrentMap<String, LoggerConfig> loggers = new ConcurrentHashMap<String, LoggerConfig>();
 
@@ -205,7 +205,7 @@ public class BaseConfiguration extends A
                 subst.setVariableResolver(new Interpolator(lookup));
             }
             if (child.getName().equalsIgnoreCase("appenders")) {
-                appenders = (ConcurrentMap<String, Appender<?>>) child.getObject();
+                appenders = (ConcurrentMap<String, Appender>) child.getObject();
             } else if (child.getObject() instanceof Filter) {
                 addFilter((Filter) child.getObject());
             } else if (child.getName().equalsIgnoreCase("loggers")) {
@@ -253,7 +253,7 @@ public class BaseConfiguration extends A
         final Layout<? extends Serializable> layout =
                 PatternLayout.createLayout("%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n",
                         null, null, null, null);
-        final Appender<?> appender = ConsoleAppender.createAppender(layout, null, "SYSTEM_OUT", "Console", "false",
+        final Appender appender = ConsoleAppender.createAppender(layout, null, "SYSTEM_OUT", "Console", "false",
             "true");
         appender.start();
         addAppender(appender);
@@ -314,7 +314,7 @@ public class BaseConfiguration extends A
      * @param name The name of the Appender.
      * @return the Appender with the specified name or null if the Appender cannot be located.
      */
-    public Appender<?> getAppender(final String name) {
+    public Appender getAppender(final String name) {
         return appenders.get(name);
     }
 
@@ -323,7 +323,7 @@ public class BaseConfiguration extends A
      * @return A Map containing each Appender's name and the Appender object.
      */
     @Override
-    public Map<String, Appender<?>> getAppenders() {
+    public Map<String, Appender> getAppenders() {
         return appenders;
     }
 
@@ -371,7 +371,7 @@ public class BaseConfiguration extends A
      */
     @Override
     public synchronized void addLoggerAppender(final org.apache.logging.log4j.core.Logger logger,
-                                               final Appender<?> appender) {
+                                               final Appender appender) {
         final String name = logger.getName();
         appenders.putIfAbsent(appender.getName(), appender);
         final LoggerConfig lc = getLoggerConfig(name);
@@ -534,7 +534,7 @@ public class BaseConfiguration extends A
 
     @Override
     public void createConfiguration(final Node node, final LogEvent event) {
-        final PluginType type = node.getType();
+        final PluginType<?> type = node.getType();
         if (type != null && type.isDeferChildren()) {
             node.setObject(createPluginObject(type, node, event));
         } else {
@@ -567,9 +567,9 @@ public class BaseConfiguration extends A
     * @return the instantiate method or null if there is none by that
     * description.
     */
-    private Object createPluginObject(final PluginType type, final Node node, final LogEvent event)
+    private <T> Object createPluginObject(final PluginType<T> type, final Node node, final LogEvent event)
     {
-        final Class clazz = type.getPluginClass();
+        final Class<T> clazz = type.getPluginClass();
 
         if (Map.class.isAssignableFrom(clazz)) {
             try {
@@ -612,7 +612,7 @@ public class BaseConfiguration extends A
         }
 
         final Annotation[][] parmArray = factoryMethod.getParameterAnnotations();
-        final Class[] parmClasses = factoryMethod.getParameterTypes();
+        final Class<?>[] parmClasses = factoryMethod.getParameterTypes();
         if (parmArray.length != parmClasses.length) {
             LOGGER.error("Number of parameter annotations does not equal the number of paramters");
         }
@@ -674,7 +674,7 @@ public class BaseConfiguration extends A
                         sb.append(name).append("={");
                         boolean first = true;
                         for (final Node child : children) {
-                            final PluginType childType = child.getType();
+                            final PluginType<?> childType = child.getType();
                             if (elem.value().equalsIgnoreCase(childType.getElementName()) ||
                                 parmClass.isAssignableFrom(childType.getPluginClass())) {
                                 used.add(child);
@@ -718,7 +718,7 @@ public class BaseConfiguration extends A
                         final Class<?> parmClass = parmClasses[index];
                         boolean present = false;
                         for (final Node child : children) {
-                            final PluginType childType = child.getType();
+                            final PluginType<?> childType = child.getType();
                             if (elem.value().equals(childType.getElementName()) ||
                                 parmClass.isAssignableFrom(childType.getPluginClass())) {
                                 sb.append(child.getName()).append("(").append(child.toString()).append(")");

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Configuration.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Configuration.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Configuration.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Configuration.java Thu Aug 15 10:47:33 2013
@@ -52,11 +52,11 @@ public interface Configuration extends F
      * Returns a Map containing all the Appenders and their name.
      * @return A Map containing each Appender's name and the Appender object.
      */
-    Map<String, Appender<?>> getAppenders();
+    Map<String, Appender> getAppenders();
 
     Map<String, LoggerConfig> getLoggers();
 
-    void addLoggerAppender(Logger logger, Appender<?> appender);
+    void addLoggerAppender(Logger logger, Appender appender);
 
     void addLoggerFilter(Logger logger, Filter filter);
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java Thu Aug 15 10:47:33 2013
@@ -107,9 +107,9 @@ public abstract class ConfigurationFacto
                     }
                     final PluginManager manager = new PluginManager("ConfigurationFactory");
                     manager.collectPlugins();
-                    final Map<String, PluginType> plugins = manager.getPlugins();
+                    final Map<String, PluginType<?>> plugins = manager.getPlugins();
                     final Set<WeightedFactory> ordered = new TreeSet<WeightedFactory>();
-                    for (final PluginType type : plugins.values()) {
+                    for (final PluginType<?> type : plugins.values()) {
                         try {
                             @SuppressWarnings("unchecked")
                             final Class<ConfigurationFactory> clazz = (Class<ConfigurationFactory>)type.getPluginClass();

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/DefaultConfiguration.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/DefaultConfiguration.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/DefaultConfiguration.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/DefaultConfiguration.java Thu Aug 15 10:47:33 2013
@@ -50,7 +50,7 @@ public class DefaultConfiguration extend
         setName(DEFAULT_NAME);
         final Layout<? extends Serializable> layout =
                 PatternLayout.createLayout("%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n", null, null, null, null);
-        final Appender<? extends Serializable> appender =
+        final Appender appender =
                 ConsoleAppender.createAppender(layout, null, "SYSTEM_OUT", "Console", "false", "true");
         appender.start();
         addAppender(appender);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/JSONConfiguration.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/JSONConfiguration.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/JSONConfiguration.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/JSONConfiguration.java Thu Aug 15 10:47:33 2013
@@ -132,7 +132,7 @@ public class JSONConfiguration extends B
                     if (advertiserString != null)
                     {
                         @SuppressWarnings("unchecked")
-                        final PluginType<Advertiser> type = getPluginManager().getPluginType(advertiserString);
+                        final PluginType<Advertiser> type = (PluginType<Advertiser>) getPluginManager().getPluginType(advertiserString);
                         if (type != null)
                         {
                             final Class<Advertiser> clazz = type.getPluginClass();

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java Thu Aug 15 10:47:33 2013
@@ -16,18 +16,6 @@
  */
 package org.apache.logging.log4j.core.config;
 
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicInteger;
-
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
@@ -54,6 +42,17 @@ import org.apache.logging.log4j.message.
 import org.apache.logging.log4j.status.StatusLogger;
 import org.apache.logging.log4j.util.PropertiesUtil;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicInteger;
+
 /**
  * Logger object that is created via configuration.
  */
@@ -66,7 +65,7 @@ public class LoggerConfig extends Abstra
     private static LogEventFactory LOG_EVENT_FACTORY = null;
 
     private List<AppenderRef> appenderRefs = new ArrayList<AppenderRef>();
-    private final Map<String, AppenderControl<?>> appenders = new ConcurrentHashMap<String, AppenderControl<?>>();
+    private final Map<String, AppenderControl> appenders = new ConcurrentHashMap<String, AppenderControl>();
     private final String name;
     private LogEventFactory logEventFactory;
     private Level level;
@@ -186,9 +185,9 @@ public class LoggerConfig extends Abstra
      * @param level The Level to use.
      * @param filter A Filter for the Appender reference.
      */
-    public <T extends Serializable> void addAppender(final Appender<T> appender, final Level level,
+    public void addAppender(final Appender appender, final Level level,
             final Filter filter) {
-        appenders.put(appender.getName(), new AppenderControl<T>(appender, level,
+        appenders.put(appender.getName(), new AppenderControl(appender, level,
                 filter));
     }
 
@@ -210,9 +209,9 @@ public class LoggerConfig extends Abstra
      * @return a Map with the Appender name as the key and the Appender as the
      *         value.
      */
-    public Map<String, Appender<?>> getAppenders() {
-        final Map<String, Appender<?>> map = new HashMap<String, Appender<?>>();
-        for (final Map.Entry<String, AppenderControl<?>> entry : appenders
+    public Map<String, Appender> getAppenders() {
+        final Map<String, Appender> map = new HashMap<String, Appender>();
+        for (final Map.Entry<String, AppenderControl> entry : appenders
                 .entrySet()) {
             map.put(entry.getKey(), entry.getValue().getAppender());
         }
@@ -224,10 +223,10 @@ public class LoggerConfig extends Abstra
      */
     protected void clearAppenders() {
         waitForCompletion();
-        final Collection<AppenderControl<?>> controls = appenders.values();
-        final Iterator<AppenderControl<?>> iterator = controls.iterator();
+        final Collection<AppenderControl> controls = appenders.values();
+        final Iterator<AppenderControl> iterator = controls.iterator();
         while (iterator.hasNext()) {
-            final AppenderControl<?> ctl = iterator.next();
+            final AppenderControl ctl = iterator.next();
             iterator.remove();
             cleanupFilter(ctl);
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Node.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Node.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Node.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Node.java Thu Aug 15 10:47:33 2013
@@ -31,7 +31,7 @@ public class Node {
     private final Node parent;
     private final String name;
     private String value;
-    private final PluginType type;
+    private final PluginType<?> type;
     private final Map<String, String> attributes = new HashMap<String, String>();
     private final List<Node> children = new ArrayList<Node>();
     private Object object;
@@ -45,7 +45,7 @@ public class Node {
      * @param name the node's name.
      * @param type The Plugin Type associated with the node.
      */
-    public Node(final Node parent, final String name, final PluginType type) {
+    public Node(final Node parent, final String name, final PluginType<?> type) {
         this.parent = parent;
         this.name = name;
         this.type = type;
@@ -109,7 +109,7 @@ public class Node {
         return object;
     }
 
-    public PluginType getType() {
+    public PluginType<?> getType() {
         return type;
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java Thu Aug 15 10:47:33 2013
@@ -205,7 +205,7 @@ public class XMLConfiguration extends Ba
                     if (advertiserString != null)
                     {
                         @SuppressWarnings("unchecked")
-                        final PluginType<Advertiser> type = getPluginManager().getPluginType(advertiserString);
+                        final PluginType<Advertiser> type = (PluginType<Advertiser>) getPluginManager().getPluginType(advertiserString);
                         if (type != null)
                         {
                             final Class<Advertiser> clazz = type.getPluginClass();

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/AppendersPlugin.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/AppendersPlugin.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/AppendersPlugin.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/AppendersPlugin.java Thu Aug 15 10:47:33 2013
@@ -16,12 +16,11 @@
  */
 package org.apache.logging.log4j.core.config.plugins;
 
-import java.io.Serializable;
+import org.apache.logging.log4j.core.Appender;
+
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
-import org.apache.logging.log4j.core.Appender;
-
 /**
  * An Appender container.
  */
@@ -37,12 +36,13 @@ public final class AppendersPlugin {
      * @return The Appender Map.
      */
     @PluginFactory
-    public static ConcurrentMap<String, Appender<? extends Serializable>> createAppenders(
-                                             @PluginElement("Appenders") final Appender<?>[] appenders) {
-        final ConcurrentMap<String, Appender<? extends Serializable>> map =
-            new ConcurrentHashMap<String, Appender<? extends Serializable>>();
+    public static ConcurrentMap<String, Appender> createAppenders(
+                @PluginElement("Appenders") final Appender[] appenders) {
+
+        final ConcurrentMap<String, Appender> map =
+            new ConcurrentHashMap<String, Appender>();
 
-        for (final Appender<?> appender : appenders) {
+        for (final Appender appender : appenders) {
                 map.put(appender.getName(), appender);
         }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java Thu Aug 15 10:47:33 2013
@@ -44,8 +44,8 @@ public class PluginManager {
 
     private static final long NANOS_PER_SECOND = 1000000000L;
 
-    private static ConcurrentMap<String, ConcurrentMap<String, PluginType>> pluginTypeMap =
-        new ConcurrentHashMap<String, ConcurrentMap<String, PluginType>>();
+    private static ConcurrentMap<String, ConcurrentMap<String, PluginType<?>>> pluginTypeMap =
+        new ConcurrentHashMap<String, ConcurrentMap<String, PluginType<?>>>();
 
     private static final CopyOnWriteArrayList<String> PACKAGES = new CopyOnWriteArrayList<String>();
     private static final String PATH = "org/apache/logging/log4j/core/config/plugins/";
@@ -56,7 +56,7 @@ public class PluginManager {
 
     private static String rootDir;
 
-    private Map<String, PluginType> plugins = new HashMap<String, PluginType>();
+    private Map<String, PluginType<?>> plugins = new HashMap<String, PluginType<?>>();
     private final String type;
     private final Class<?> clazz;
 
@@ -110,7 +110,7 @@ public class PluginManager {
      * @param name The name of the plugin.
      * @return The plugin's type.
      */
-    public PluginType getPluginType(final String name) {
+    public PluginType<?> getPluginType(final String name) {
         return plugins.get(name.toLowerCase());
     }
 
@@ -118,7 +118,7 @@ public class PluginManager {
      * Returns all the matching plugins.
      * @return A Map containing the name of the plugin and its type.
      */
-    public Map<String, PluginType> getPlugins() {
+    public Map<String, PluginType<?>> getPlugins() {
         return plugins;
     }
 
@@ -135,7 +135,7 @@ public class PluginManager {
      * @param pkgs A comma separated list of package names to scan for plugins. If
      * null the default Log4j package name will be used.
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public void collectPlugins(boolean preLoad, final String pkgs) {
         if (pluginTypeMap.containsKey(type)) {
             plugins = pluginTypeMap.get(type);
@@ -148,7 +148,7 @@ public class PluginManager {
             resolver.setClassLoader(classLoader);
         }
         if (preLoad) {
-            final ConcurrentMap<String, ConcurrentMap<String, PluginType>> map = decode(classLoader);
+            final ConcurrentMap<String, ConcurrentMap<String, PluginType<?>>> map = decode(classLoader);
             if (map != null) {
                 pluginTypeMap = map;
                 plugins = map.get(type);
@@ -176,9 +176,9 @@ public class PluginManager {
             final Plugin plugin = clazz.getAnnotation(Plugin.class);
             final String pluginType = plugin.category();
             if (!pluginTypeMap.containsKey(pluginType)) {
-                pluginTypeMap.putIfAbsent(pluginType, new ConcurrentHashMap<String, PluginType>());
+                pluginTypeMap.putIfAbsent(pluginType, new ConcurrentHashMap<String, PluginType<?>>());
             }
-            final Map<String, PluginType> map = pluginTypeMap.get(pluginType);
+            final Map<String, PluginType<?>> map = pluginTypeMap.get(pluginType);
             final String type = plugin.elementType().equals(Plugin.EMPTY) ? plugin.name() : plugin.elementType();
             map.put(plugin.name().toLowerCase(), new PluginType(clazz, type, plugin.printObject(),
                 plugin.deferChildren()));
@@ -196,8 +196,8 @@ public class PluginManager {
         LOGGER.debug(sb.toString());
     }
 
-    @SuppressWarnings("unchecked")
-    private static ConcurrentMap<String, ConcurrentMap<String, PluginType>> decode(final ClassLoader classLoader) {
+    @SuppressWarnings({ "unchecked" })
+    private static ConcurrentMap<String, ConcurrentMap<String, PluginType<?>>> decode(final ClassLoader classLoader) {
         Enumeration<URL> resources;
         try {
             resources = classLoader.getResources(PATH + FILENAME);
@@ -205,8 +205,8 @@ public class PluginManager {
             LOGGER.warn("Unable to preload plugins", ioe);
             return null;
         }
-        final ConcurrentMap<String, ConcurrentMap<String, PluginType>> map =
-            new ConcurrentHashMap<String, ConcurrentMap<String, PluginType>>();
+        final ConcurrentMap<String, ConcurrentMap<String, PluginType<?>>> map =
+            new ConcurrentHashMap<String, ConcurrentMap<String, PluginType<?>>>();
         while (resources.hasMoreElements()) {
             DataInputStream dis = null;
             try {
@@ -219,9 +219,9 @@ public class PluginManager {
                 for (int j = 0; j < count; ++j) {
                     final String type = dis.readUTF();
                     final int entries = dis.readInt();
-                    ConcurrentMap<String, PluginType> types = map.get(type);
+                    ConcurrentMap<String, PluginType<?>> types = map.get(type);
                     if (types == null) {
-                        types = new ConcurrentHashMap<String, PluginType>(count);
+                        types = new ConcurrentHashMap<String, PluginType<?>>(count);
                     }
                     for (int i = 0; i < entries; ++i) {
                         final String key = dis.readUTF();
@@ -248,7 +248,7 @@ public class PluginManager {
         return map.size() == 0 ? null : map;
     }
 
-    private static void encode(final ConcurrentMap<String, ConcurrentMap<String, PluginType>> map) {
+    private static void encode(final ConcurrentMap<String, ConcurrentMap<String, PluginType<?>>> map) {
         final String fileName = rootDir + PATH + FILENAME;
         DataOutputStream dos = null;
         try {
@@ -258,12 +258,12 @@ public class PluginManager {
             final BufferedOutputStream bos = new BufferedOutputStream(fos);
             dos = new DataOutputStream(bos);
             dos.writeInt(map.size());
-            for (final Map.Entry<String, ConcurrentMap<String, PluginType>> outer : map.entrySet()) {
+            for (final Map.Entry<String, ConcurrentMap<String, PluginType<?>>> outer : map.entrySet()) {
                 dos.writeUTF(outer.getKey());
                 dos.writeInt(outer.getValue().size());
-                for (final Map.Entry<String, PluginType> entry : outer.getValue().entrySet()) {
+                for (final Map.Entry<String, PluginType<?>> entry : outer.getValue().entrySet()) {
                     dos.writeUTF(entry.getKey());
-                    final PluginType pt = entry.getValue();
+                    final PluginType<?> pt = entry.getValue();
                     dos.writeUTF(pt.getPluginClass().getName());
                     dos.writeUTF(pt.getElementName());
                     dos.writeBoolean(pt.isObjectPrintable());

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/AppenderAdmin.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/AppenderAdmin.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/AppenderAdmin.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/AppenderAdmin.java Thu Aug 15 10:47:33 2013
@@ -27,7 +27,7 @@ import org.apache.logging.log4j.core.hel
 public class AppenderAdmin implements AppenderAdminMBean {
 
     private final String contextName;
-    private final Appender<?> appender;
+    private final Appender appender;
     private final ObjectName objectName;
 
     /**
@@ -37,7 +37,7 @@ public class AppenderAdmin implements Ap
      * @param contextName used in the {@code ObjectName} for this mbean
      * @param appender the instrumented object
      */
-    public AppenderAdmin(final String contextName, final Appender<?> appender) {
+    public AppenderAdmin(final String contextName, final Appender appender) {
         // super(executor); // no notifications for now
         this.contextName = Assert.isNotNull(contextName, "contextName");
         this.appender = Assert.isNotNull(appender, "appender");

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/Server.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/Server.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/Server.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/Server.java Thu Aug 15 10:47:33 2013
@@ -240,9 +240,9 @@ public final class Server {
             InstanceAlreadyExistsException, MBeanRegistrationException,
             NotCompliantMBeanException {
 
-        final Map<String, Appender<?>> map = ctx.getConfiguration().getAppenders();
+        final Map<String, Appender> map = ctx.getConfiguration().getAppenders();
         for (final String name : map.keySet()) {
-            final Appender<?> appender = map.get(name);
+            final Appender appender = map.get(name);
             final AppenderAdmin mbean = new AppenderAdmin(ctx.getName(), appender);
             mbs.registerMBean(mbean, mbean.getObjectName());
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java Thu Aug 15 10:47:33 2013
@@ -43,11 +43,11 @@ public class Interpolator implements Str
         this.defaultLookup = defaultLookup == null ? new MapLookup(new HashMap<String, String>()) : defaultLookup;
         final PluginManager manager = new PluginManager("Lookup");
         manager.collectPlugins();
-        final Map<String, PluginType> plugins = manager.getPlugins();
+        final Map<String, PluginType<?>> plugins = manager.getPlugins();
 
-        for (final Map.Entry<String, PluginType> entry : plugins.entrySet()) {
+        for (final Map.Entry<String, PluginType<?>> entry : plugins.entrySet()) {
             @SuppressWarnings("unchecked")
-            final Class<StrLookup> clazz = entry.getValue().getPluginClass();
+            final Class<? extends StrLookup> clazz = (Class<? extends StrLookup>) entry.getValue().getPluginClass();
             try {
                 lookups.put(entry.getKey(), clazz.newInstance());
             } catch (final Exception ex) {

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/AbstractSocketManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/AbstractSocketManager.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/AbstractSocketManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/AbstractSocketManager.java Thu Aug 15 10:47:33 2013
@@ -16,14 +16,15 @@
  */
 package org.apache.logging.log4j.core.net;
 
+import org.apache.logging.log4j.core.Layout;
+import org.apache.logging.log4j.core.appender.OutputStreamManager;
+
 import java.io.OutputStream;
+import java.io.Serializable;
 import java.net.InetAddress;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.logging.log4j.core.Layout;
-import org.apache.logging.log4j.core.appender.OutputStreamManager;
-
 /**
  * Abstract base class for managing sockets.
  */
@@ -51,7 +52,7 @@ public abstract class AbstractSocketMana
      * @param port The target port number.
      */
     public AbstractSocketManager(final String name, final OutputStream os, final InetAddress addr, final String host,
-                                 final int port, final Layout layout) {
+                                 final int port, final Layout<? extends Serializable> layout) {
         super(os, name, layout);
         this.address = addr;
         this.host = host;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/DatagramSocketManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/DatagramSocketManager.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/DatagramSocketManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/DatagramSocketManager.java Thu Aug 15 10:47:33 2013
@@ -16,16 +16,17 @@
  */
 package org.apache.logging.log4j.core.net;
 
+import org.apache.logging.log4j.core.Layout;
+import org.apache.logging.log4j.core.appender.ManagerFactory;
+import org.apache.logging.log4j.core.helpers.Strings;
+
 import java.io.OutputStream;
+import java.io.Serializable;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.logging.log4j.core.Layout;
-import org.apache.logging.log4j.core.appender.ManagerFactory;
-import org.apache.logging.log4j.core.helpers.Strings;
-
 /**
  * Socket Manager for UDP connections.
  */
@@ -43,7 +44,7 @@ public class DatagramSocketManager exten
      * @param layout The layout
      */
     protected DatagramSocketManager(final String name, final OutputStream os, final InetAddress address, final String host,
-                                    final int port, final Layout layout) {
+                final int port, final Layout<? extends Serializable> layout) {
         super(name, os, address, host, port, layout);
     }
 
@@ -54,7 +55,7 @@ public class DatagramSocketManager exten
      * @param layout The layout.
      * @return A DatagramSocketManager.
      */
-    public static DatagramSocketManager getSocketManager(final String host, final int port, final Layout layout) {
+    public static DatagramSocketManager getSocketManager(final String host, final int port, final Layout<? extends Serializable> layout) {
         if (Strings.isEmpty(host)) {
             throw new IllegalArgumentException("A host name is required");
         }
@@ -87,9 +88,9 @@ public class DatagramSocketManager exten
     private static class FactoryData {
         private final String host;
         private final int port;
-        private final Layout layout;
+        private final Layout<? extends Serializable> layout;
 
-        public FactoryData(final String host, final int port, final Layout layout) {
+        public FactoryData(final String host, final int port, final Layout<? extends Serializable> layout) {
             this.host = host;
             this.port = port;
             this.layout = layout;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/MulticastDNSAdvertiser.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/MulticastDNSAdvertiser.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/MulticastDNSAdvertiser.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/MulticastDNSAdvertiser.java Thu Aug 15 10:47:33 2013
@@ -167,7 +167,7 @@ public class MulticastDNSAdvertiser impl
         //version 1 uses a hashtable
         final Hashtable<String, String> hashtableProperties = new Hashtable<String, String>(properties);
         try {
-            final Class[] args = new Class[6];
+            final Class<?>[] args = new Class<?>[6];
             args[0] = String.class;
             args[1] = String.class;
             args[2] = int.class;
@@ -197,7 +197,7 @@ public class MulticastDNSAdvertiser impl
 
     private Object buildServiceInfoVersion3(final String zone, final int port, final String name, final Map<String, String> properties) {
         try {
-            final Class[] args = new Class[6];
+            final Class<?>[] args = new Class<?>[6];
             args[0] = String.class; //zone/type
             args[1] = String.class; //display name
             args[2] = int.class; //port

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/TCPSocketManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/TCPSocketManager.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/TCPSocketManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/TCPSocketManager.java Thu Aug 15 10:47:33 2013
@@ -16,9 +16,16 @@
  */
 package org.apache.logging.log4j.core.net;
 
+import org.apache.logging.log4j.core.Layout;
+import org.apache.logging.log4j.core.appender.AppenderLoggingException;
+import org.apache.logging.log4j.core.appender.ManagerFactory;
+import org.apache.logging.log4j.core.appender.OutputStreamManager;
+import org.apache.logging.log4j.core.helpers.Strings;
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.io.Serializable;
 import java.net.ConnectException;
 import java.net.InetAddress;
 import java.net.Socket;
@@ -27,12 +34,6 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.CountDownLatch;
 
-import org.apache.logging.log4j.core.Layout;
-import org.apache.logging.log4j.core.appender.AppenderLoggingException;
-import org.apache.logging.log4j.core.appender.ManagerFactory;
-import org.apache.logging.log4j.core.appender.OutputStreamManager;
-import org.apache.logging.log4j.core.helpers.Strings;
-
 /**
  * Manager of TCP Socket connections.
  */
@@ -72,7 +73,7 @@ public class TCPSocketManager extends Ab
      */
     public TCPSocketManager(final String name, final OutputStream os, final Socket sock, final InetAddress addr,
                             final String host, final int port, final int delay, final boolean immediateFail,
-                            final Layout layout) {
+                            final Layout<? extends Serializable> layout) {
         super(name, os, addr, host, port, layout);
         this.reconnectionDelay = delay;
         this.socket = sock;
@@ -94,7 +95,7 @@ public class TCPSocketManager extends Ab
      * @return A TCPSocketManager.
      */
     public static TCPSocketManager getSocketManager(final String host, int port, int delay,
-                                                    final boolean immediateFail, final Layout layout ) {
+                                                    final boolean immediateFail, final Layout<? extends Serializable> layout ) {
         if (Strings.isEmpty(host)) {
             throw new IllegalArgumentException("A host name is required");
         }
@@ -228,10 +229,10 @@ public class TCPSocketManager extends Ab
         private final int port;
         private final int delay;
         private final boolean immediateFail;
-        private final Layout layout;
+        private final Layout<? extends Serializable> layout;
 
         public FactoryData(final String host, final int port, final int delay, final boolean immediateFail,
-                           final Layout layout) {
+                           final Layout<? extends Serializable> layout) {
             this.host = host;
             this.port = port;
             this.delay = delay;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java Thu Aug 15 10:47:33 2013
@@ -114,10 +114,10 @@ public final class PatternParser {
         this.config = config;
         final PluginManager manager = new PluginManager(converterKey, expectedClass);
         manager.collectPlugins();
-        final Map<String, PluginType> plugins = manager.getPlugins();
+        final Map<String, PluginType<?>> plugins = manager.getPlugins();
         final Map<String, Class<PatternConverter>> converters = new HashMap<String, Class<PatternConverter>>();
 
-        for (final PluginType type : plugins.values()) {
+        for (final PluginType<?> type : plugins.values()) {
             try {
                 @SuppressWarnings("unchecked")
                 final Class<PatternConverter> clazz = (Class<PatternConverter>)type.getPluginClass();

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SimpleSmtpServer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SimpleSmtpServer.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SimpleSmtpServer.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SimpleSmtpServer.java Thu Aug 15 10:47:33 2013
@@ -229,7 +229,7 @@ public class SimpleSmtpServer implements
      *
      * @return List of String
      */
-    public synchronized Iterator getReceivedEmail() {
+    public synchronized Iterator<SmtpMessage> getReceivedEmail() {
         return receivedMail.iterator();
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpMessage.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpMessage.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpMessage.java Thu Aug 15 10:47:33 2013
@@ -70,8 +70,8 @@ public class SmtpMessage {
      *
      * @return an Iterator over the set of header names (String)
      */
-    public Iterator getHeaderNames() {
-        final Set nameSet = headers.keySet();
+    public Iterator<String> getHeaderNames() {
+        final Set<String> nameSet = headers.keySet();
         return nameSet.iterator();
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/ReflectionComparison.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/ReflectionComparison.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/ReflectionComparison.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/ReflectionComparison.java Thu Aug 15 10:47:33 2013
@@ -22,6 +22,7 @@ import org.apache.logging.log4j.message.
 import org.apache.logging.log4j.message.StringFormattedMessage;
 import org.junit.BeforeClass;
 import org.junit.Test;
+
 import sun.reflect.Reflection;
 
 import java.lang.reflect.Constructor;
@@ -39,13 +40,13 @@ public class ReflectionComparison {
 
     private static final int COUNT = 1000000;
 
-    private static Class[] paramTypes = new Class[] {String.class, Object[].class};
+    private static Class<?>[] paramTypes = new Class<?>[] {String.class, Object[].class};
 
     @BeforeClass
     public static void setupCallerCheck() {
         try {
             final ClassLoader loader = Loader.getClassLoader();
-            final Class clazz = loader.loadClass("sun.reflect.Reflection");
+            final Class<?> clazz = loader.loadClass("sun.reflect.Reflection");
             final Method[] methods = clazz.getMethods();
             for (final Method method : methods) {
                 final int modifier = method.getModifiers();
@@ -109,11 +110,11 @@ public class ReflectionComparison {
         System.out.println(timer.toString());
     }
 
-    private Class getCallerClass(final Object[] array) {
+    private Class<?> getCallerClass(final Object[] array) {
         if (getCallerClass != null) {
             try {
                 /*Object[] params = new Object[]{index}; */
-                return (Class) getCallerClass.invoke(null, array);
+                return (Class<?>) getCallerClass.invoke(null, array);
             } catch (final Exception ex) {
                 fail(ex.getMessage());
                 // logger.debug("Unable to determine caller class via Sun Reflection", ex);

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/AppenderRefLevelTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/AppenderRefLevelTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/AppenderRefLevelTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/AppenderRefLevelTest.java Thu Aug 15 10:47:33 2013
@@ -40,21 +40,20 @@ public class AppenderRefLevelTest {
 
     private static final String CONFIG = "log4j-reference-level.xml";
     private static Configuration config;
-    private static ListAppender<LogEvent> app1;
-    private static ListAppender<LogEvent> app2;
+    private static ListAppender app1;
+    private static ListAppender app2;
     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()) {
+        for (final Map.Entry<String, Appender> entry : config.getAppenders().entrySet()) {
             if (entry.getKey().equals("LIST1")) {
-                app1 = (ListAppender<LogEvent>) entry.getValue();
+                app1 = (ListAppender) entry.getValue();
             } else if (entry.getKey().equals("LIST2")) {
-                app2 = (ListAppender<LogEvent>) entry.getValue();
+                app2 = (ListAppender) entry.getValue();
             }
         }
     }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/FileConfigTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/FileConfigTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/FileConfigTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/FileConfigTest.java Thu Aug 15 10:47:33 2013
@@ -60,7 +60,7 @@ public class FileConfigTest {
     @Before
     public void before() {
         config = ctx.getConfiguration();
-        for (final Map.Entry<String, Appender<?>> entry : config.getAppenders().entrySet()) {
+        for (final Map.Entry<String, Appender> entry : config.getAppenders().entrySet()) {
             if (entry.getKey().equals("List")) {
                 app = (ListAppender) entry.getValue();
                 break;

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LogEventFactoryTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LogEventFactoryTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LogEventFactoryTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LogEventFactoryTest.java Thu Aug 15 10:47:33 2013
@@ -47,19 +47,18 @@ public class LogEventFactoryTest {
 
     private static final String CONFIG = "log4j2-config.xml";
     private static Configuration config;
-    private static ListAppender<LogEvent> app;
+    private static ListAppender app;
     private static LoggerContext ctx;
 
     @BeforeClass
-    @SuppressWarnings("unchecked")
     public static void setupClass() {
         System.setProperty(Constants.LOG4J_LOG_EVENT_FACTORY, TestLogEventFactory.class.getName());
         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()) {
+        for (final Map.Entry<String, Appender> entry : config.getAppenders().entrySet()) {
             if (entry.getKey().equals("List")) {
-                app = (ListAppender<LogEvent>) entry.getValue();
+                app = (ListAppender) entry.getValue();
                 break;
             }
         }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java Thu Aug 15 10:47:33 2013
@@ -49,9 +49,9 @@ public class LoggerTest {
 
     private static final String CONFIG = "log4j-test2.xml";
     private static Configuration config;
-    private static ListAppender<LogEvent> app;
-    private static ListAppender<String> host;
-    private static ListAppender<String> noThrown;
+    private static ListAppender app;
+    private static ListAppender host;
+    private static ListAppender noThrown;
     private static LoggerContext ctx;
 
     @BeforeClass
@@ -68,16 +68,15 @@ public class LoggerTest {
     }
 
     @Before
-    @SuppressWarnings("unchecked")
     public void before() {
         config = ctx.getConfiguration();
-        for (final Map.Entry<String, Appender<?>> entry : config.getAppenders().entrySet()) {
+        for (final Map.Entry<String, Appender> entry : config.getAppenders().entrySet()) {
             if (entry.getKey().equals("List")) {
-                app = (ListAppender<LogEvent>) entry.getValue();
+                app = (ListAppender) entry.getValue();
             } else if (entry.getKey().equals("HostTest")) {
-                host = (ListAppender<String>) entry.getValue();
+                host = (ListAppender) entry.getValue();
             } else if (entry.getKey().equals("NoThrowable")) {
-                noThrown = (ListAppender<String>) entry.getValue();
+                noThrown = (ListAppender) entry.getValue();
             }
         }
         assertNotNull("No Appender", app);

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerUpdateTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerUpdateTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerUpdateTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerUpdateTest.java Thu Aug 15 10:47:33 2013
@@ -40,9 +40,9 @@ public class LoggerUpdateTest {
 
     private static final String CONFIG = "log4j-test2.xml";
     private static Configuration config;
-    private static ListAppender<LogEvent> app;
-    private static ListAppender<String> host;
-    private static ListAppender<String> noThrown;
+    private static ListAppender app;
+    private static ListAppender host;
+    private static ListAppender noThrown;
     private static LoggerContext ctx;
 
     @BeforeClass
@@ -59,16 +59,15 @@ public class LoggerUpdateTest {
     }
 
     @Before
-    @SuppressWarnings("unchecked")
     public void before() {
         config = ctx.getConfiguration();
-        for (final Map.Entry<String, Appender<?>> entry : config.getAppenders().entrySet()) {
+        for (final Map.Entry<String, Appender> entry : config.getAppenders().entrySet()) {
             if (entry.getKey().equals("List")) {
-                app = (ListAppender<LogEvent>) entry.getValue();
+                app = (ListAppender) entry.getValue();
             } else if (entry.getKey().equals("HostTest")) {
-                host = (ListAppender<String>) entry.getValue();
+                host = (ListAppender) entry.getValue();
             } else if (entry.getKey().equals("NoThrowable")) {
-                noThrown = (ListAppender<String>) entry.getValue();
+                noThrown = (ListAppender) entry.getValue();
             }
         }
         assertNotNull("No Appender", app);

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/ShutdownDisabledTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/ShutdownDisabledTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/ShutdownDisabledTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/ShutdownDisabledTest.java Thu Aug 15 10:47:33 2013
@@ -35,7 +35,7 @@ public class ShutdownDisabledTest {
 
     private static final String CONFIG = "log4j-test3.xml";
     private static Configuration config;
-    private static ListAppender<LogEvent> app;
+    private static ListAppender app;
     private static LoggerContext ctx;
 
     @BeforeClass
@@ -52,7 +52,6 @@ public class ShutdownDisabledTest {
     }
 
     @Before
-    @SuppressWarnings("unchecked")
     public void before() {
         config = ctx.getConfiguration();
     }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/StrictXMLConfigTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/StrictXMLConfigTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/StrictXMLConfigTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/StrictXMLConfigTest.java Thu Aug 15 10:47:33 2013
@@ -43,18 +43,17 @@ public class StrictXMLConfigTest {
 
     private static final String CONFIG = "log4j-strict1.xml";
     private static Configuration config;
-    private static ListAppender<LogEvent> app;
+    private static ListAppender 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()) {
+        for (final Map.Entry<String, Appender> entry : config.getAppenders().entrySet()) {
             if (entry.getKey().equals("List")) {
-                app = (ListAppender<LogEvent>) entry.getValue();
+                app = (ListAppender) entry.getValue();
                 assertNotNull(app);
                 break;
             }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderNoLocationTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderNoLocationTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderNoLocationTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderNoLocationTest.java Thu Aug 15 10:47:33 2013
@@ -41,18 +41,17 @@ import static org.junit.Assert.assertTru
 public class AsyncAppenderNoLocationTest {
     private static final String CONFIG = "log4j-asynch-no-location.xml";
     private static Configuration config;
-    private static ListAppender<String> app;
+    private static ListAppender 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()) {
+        for (final Map.Entry<String, Appender> entry : config.getAppenders().entrySet()) {
             if (entry.getKey().equals("List")) {
-                app = (ListAppender<String>) entry.getValue();
+                app = (ListAppender) entry.getValue();
                 break;
             }
         }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderTest.java Thu Aug 15 10:47:33 2013
@@ -41,18 +41,17 @@ import static org.junit.Assert.*;
 public class AsyncAppenderTest {
     private static final String CONFIG = "log4j-asynch.xml";
     private static Configuration config;
-    private static ListAppender<String> app;
+    private static ListAppender 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()) {
+        for (final Map.Entry<String, Appender> entry : config.getAppenders().entrySet()) {
             if (entry.getKey().equals("List")) {
-                app = (ListAppender<String>) entry.getValue();
+                app = (ListAppender) entry.getValue();
                 break;
             }
         }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderTest.java Thu Aug 15 10:47:33 2013
@@ -52,7 +52,7 @@ public class ConsoleAppenderTest {
     public void testFollow() {
         final PrintStream ps = System.out;
         final Layout<String> layout = PatternLayout.createLayout(null, null, null, null, null);
-        final ConsoleAppender<String> app = ConsoleAppender.createAppender(layout, null, "SYSTEM_OUT", "Console", "true", "false");
+        final ConsoleAppender app = ConsoleAppender.createAppender(layout, null, "SYSTEM_OUT", "Console", "true", "false");
         app.start();
         final LogEvent event = new Log4jLogEvent("TestLogger", null, ConsoleAppenderTest.class.getName(), Level.INFO,
             new SimpleMessage("Test"), null);

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FailoverAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FailoverAppenderTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FailoverAppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FailoverAppenderTest.java Thu Aug 15 10:47:33 2013
@@ -41,19 +41,18 @@ import static org.junit.Assert.assertNot
 public class FailoverAppenderTest {
     private static final String CONFIG = "log4j-failover.xml";
     private static Configuration config;
-    private static ListAppender<LogEvent> app;
-    private static FailOnceAppender<LogEvent> foApp;
+    private static ListAppender app;
+    private static FailOnceAppender foApp;
     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()) {
+        for (final Map.Entry<String, Appender> entry : config.getAppenders().entrySet()) {
             if (entry.getKey().equals("List")) {
-                app = (ListAppender<LogEvent>) entry.getValue();
+                app = (ListAppender) entry.getValue();
             } else if (entry.getKey().equals("Once")) {
                 foApp = (FailOnceAppender) entry.getValue();
             }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FileAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FileAppenderTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FileAppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FileAppenderTest.java Thu Aug 15 10:47:33 2013
@@ -138,7 +138,7 @@ public class FileAppenderTest {
 
     private static void writer(final boolean lock, final int count, final String name) throws Exception {
         final Layout<String> layout = PatternLayout.createLayout(PatternLayout.SIMPLE_CONVERSION_PATTERN, null, null, null, null);
-        final FileAppender<String> app = FileAppender.createAppender(FILENAME, "true", Boolean.toString(lock), "test", "false",
+        final FileAppender app = FileAppender.createAppender(FILENAME, "true", Boolean.toString(lock), "test", "false",
             "false", "false", layout, null, "false", null, null);
         final Thread t = Thread.currentThread();
         app.start();

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/OutputStreamAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/OutputStreamAppenderTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/OutputStreamAppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/OutputStreamAppenderTest.java Thu Aug 15 10:47:33 2013
@@ -38,7 +38,7 @@ public class OutputStreamAppenderTest {
     @Test
     public void testAppender() {
         final Layout<String> layout = PatternLayout.createLayout(null, null, null, null, null);
-        final InMemoryAppender<String> app = new InMemoryAppender<String>("test", layout, null, false);
+        final InMemoryAppender app = new InMemoryAppender("test", layout, null, false);
         final LogEvent event = new Log4jLogEvent("TestLogger", null, OutputStreamAppenderTest.class.getName(), Level.INFO,
             new SimpleMessage("Test"), null);
         app.start();

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SMTPAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SMTPAppenderTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SMTPAppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SMTPAppenderTest.java Thu Aug 15 10:47:33 2013
@@ -149,7 +149,7 @@ public class SMTPAppenderTest {
 
         server.stop();
         assertTrue(server.getReceivedEmailSize() == 1);
-        final SmtpMessage email = (SmtpMessage) server.getReceivedEmail().next();
+        final SmtpMessage email = server.getReceivedEmail().next();
 
         assertEquals("to@example.com", email.getHeaderValue("To"));
         assertEquals("cc@example.com", email.getHeaderValue("Cc"));

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SocketAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SocketAppenderTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SocketAppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SocketAppenderTest.java Thu Aug 15 10:47:33 2013
@@ -85,9 +85,9 @@ public class SocketAppenderTest {
 
     @After
     public void teardown() {
-        final Map<String,Appender<?>> map = root.getAppenders();
-        for (final Map.Entry<String, Appender<?>> entry : map.entrySet()) {
-            final Appender<?> app = entry.getValue();
+        final Map<String,Appender> map = root.getAppenders();
+        for (final Map.Entry<String, Appender> entry : map.entrySet()) {
+            final Appender app = entry.getValue();
             root.removeAppender(app);
             app.stop();
         }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SyslogAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SyslogAppenderTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SyslogAppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SyslogAppenderTest.java Thu Aug 15 10:47:33 2013
@@ -84,9 +84,9 @@ public class SyslogAppenderTest {
 
     @After
     public void teardown() {
-        final Map<String,Appender<?>> map = root.getAppenders();
-        for (final Map.Entry<String, Appender<?>> entry : map.entrySet()) {
-            final Appender<?> app = entry.getValue();
+        final Map<String,Appender> map = root.getAppenders();
+        for (final Map.Entry<String, Appender> entry : map.entrySet()) {
+            final Appender app = entry.getValue();
             root.removeAppender(app);
             app.stop();
         }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/AbstractJdbcAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/AbstractJdbcAppenderTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/AbstractJdbcAppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/AbstractJdbcAppenderTest.java Thu Aug 15 10:47:33 2013
@@ -75,8 +75,8 @@ public abstract class AbstractJdbcAppend
     public void tearDown() throws SQLException {
         final LoggerContext context = (LoggerContext) LogManager.getContext(false);
         try {
-            final Map<String, Appender<?>> list = context.getConfiguration().getAppenders();
-            final Appender<?> appender = list.get("databaseAppender");
+            final Map<String, Appender> list = context.getConfiguration().getAppenders();
+            final Appender appender = list.get("databaseAppender");
             assertNotNull("The appender should not be null.", appender);
             assertTrue("The appender should be a JDBCAppender.", appender instanceof JDBCAppender);
             ((JDBCAppender) appender).getManager().release();

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/AbstractJpaAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/AbstractJpaAppenderTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/AbstractJpaAppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/AbstractJpaAppenderTest.java Thu Aug 15 10:47:33 2013
@@ -60,8 +60,8 @@ public abstract class AbstractJpaAppende
     public void tearDown() throws SQLException {
         final LoggerContext context = (LoggerContext) LogManager.getContext(false);
         try {
-            final Map<String, Appender<?>> list = context.getConfiguration().getAppenders();
-            final Appender<?> appender = list.get("databaseAppender");
+            final Map<String, Appender> list = context.getConfiguration().getAppenders();
+            final Appender appender = list.get("databaseAppender");
             assertNotNull("The appender should not be null.", appender);
             assertTrue("The appender should be a JPAAppender.", appender instanceof JPAAppender);
             ((JPAAppender) appender).getManager().release();

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppenderTest.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppenderTest.java Thu Aug 15 10:47:33 2013
@@ -47,21 +47,20 @@ import static org.junit.Assert.assertEqu
 public class RewriteAppenderTest {
     private static final String CONFIG = "log4j-rewrite.xml";
     private static Configuration config;
-    private static ListAppender<LogEvent> app;
-    private static ListAppender<String> app2;
+    private static ListAppender app;
+    private static ListAppender app2;
     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()) {
+        for (final Map.Entry<String, Appender> entry : config.getAppenders().entrySet()) {
             if (entry.getKey().equals("List")) {
-                app = (ListAppender<LogEvent>) entry.getValue();
+                app = (ListAppender) entry.getValue();
             } else if (entry.getKey().equals("List2")) {
-                app2 = (ListAppender<String>) entry.getValue();
+                app2 = (ListAppender) entry.getValue();
             }
         }
     }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/routing/JSONRoutingAppender2Test.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/routing/JSONRoutingAppender2Test.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/routing/JSONRoutingAppender2Test.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/routing/JSONRoutingAppender2Test.java Thu Aug 15 10:47:33 2013
@@ -43,18 +43,17 @@ import static org.junit.Assert.assertTru
 public class JSONRoutingAppender2Test {
     private static final String CONFIG = "log4j-routing2.json";
     private static Configuration config;
-    private static ListAppender<LogEvent> app;
+    private static ListAppender 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()) {
+        for (final Map.Entry<String, Appender> entry : config.getAppenders().entrySet()) {
             if (entry.getKey().equals("List")) {
-                app = (ListAppender<LogEvent>) entry.getValue();
+                app = (ListAppender) entry.getValue();
                 break;
             }
         }



Mime
View raw message