logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattsic...@apache.org
Subject svn commit: r1584461 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java
Date Thu, 03 Apr 2014 23:18:57 GMT
Author: mattsicker
Date: Thu Apr  3 23:18:56 2014
New Revision: 1584461

URL: http://svn.apache.org/r1584461
Log:
Weaken collection interface.

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java?rev=1584461&r1=1584460&r2=1584461&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java
Thu Apr  3 23:18:56 2014
@@ -26,12 +26,11 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.TreeSet;
-
 import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.core.config.plugins.PluginManager;
 import org.apache.logging.log4j.core.config.plugins.PluginType;
@@ -124,7 +123,7 @@ public abstract class ConfigurationFacto
                     final PluginManager manager = new PluginManager("ConfigurationFactory");
                     manager.collectPlugins();
                     final Map<String, PluginType<?>> plugins = manager.getPlugins();
-                    final Set<WeightedFactory> ordered = new TreeSet<WeightedFactory>();
+                    final Collection<WeightedFactory> ordered = new TreeSet<WeightedFactory>();
                     for (final PluginType<?> type : plugins.values()) {
                         try {
                             @SuppressWarnings("unchecked")
@@ -150,7 +149,7 @@ public abstract class ConfigurationFacto
     }
 
     @SuppressWarnings("unchecked")
-    private static void addFactory(final List<ConfigurationFactory> list, final String
factoryClass) {
+    private static void addFactory(final Collection<ConfigurationFactory> list, final
String factoryClass) {
         try {
             addFactory(list, (Class<ConfigurationFactory>) Class.forName(factoryClass));
         } catch (final ClassNotFoundException ex) {
@@ -160,7 +159,7 @@ public abstract class ConfigurationFacto
         }
     }
 
-    private static void addFactory(final List<ConfigurationFactory> list,
+    private static void addFactory(final Collection<ConfigurationFactory> list,
                                    final Class<ConfigurationFactory> factoryClass)
{
         try {
             list.add(factoryClass.newInstance());



Mime
View raw message