logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattsic...@apache.org
Subject svn commit: r1585170 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
Date Sat, 05 Apr 2014 19:12:01 GMT
Author: mattsicker
Date: Sat Apr  5 19:12:01 2014
New Revision: 1585170

URL: http://svn.apache.org/r1585170
Log:
Simplify array copy to collection.

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

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java?rev=1585170&r1=1585169&r2=1585170&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
Sat Apr  5 19:12:01 2014
@@ -26,6 +26,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
 import java.text.DecimalFormat;
+import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Map;
@@ -165,9 +166,7 @@ public class PluginManager {
                 }
             } else {
                 final String[] names = pkgs.split(Patterns.COMMA_SEPARATOR);
-                for (final String name : names) {
-                    PACKAGES.add(name);
-                }
+                Collections.addAll(PACKAGES, names);
             }
         }
         final ResolverUtil.Test test = new PluginTest(clazz);



Mime
View raw message