logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1433038 - /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/AppendersPlugin.java
Date Mon, 14 Jan 2013 18:58:21 GMT
Author: ggregory
Date: Mon Jan 14 18:58:21 2013
New Revision: 1433038

URL: http://svn.apache.org/viewvc?rev=1433038&view=rev
Log:
Generics.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/AppendersPlugin.java

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=1433038&r1=1433037&r2=1433038&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
Mon Jan 14 18:58:21 2013
@@ -16,11 +16,12 @@
  */
 package org.apache.logging.log4j.core.config.plugins;
 
-import org.apache.logging.log4j.core.Appender;
-
+import java.io.Serializable;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
+import org.apache.logging.log4j.core.Appender;
+
 /**
  * An Appender container.
  */
@@ -36,10 +37,10 @@ public final class AppendersPlugin {
      * @return The Appender Map.
      */
     @PluginFactory
-    public static ConcurrentMap<String, Appender> createAppenders(@PluginElement("appenders")
final Appender[] appenders) {
-        final ConcurrentMap<String, Appender> map = new ConcurrentHashMap<String,
Appender>();
+    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>>();
 
-        for (final Appender appender : appenders) {
+        for (final Appender<?> appender : appenders) {
                 map.put(appender.getName(), appender);
         }
 



Mime
View raw message