logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattsic...@apache.org
Subject svn commit: r1601029 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/util/PluginManager.java
Date Fri, 06 Jun 2014 22:51:35 GMT
Author: mattsicker
Date: Fri Jun  6 22:51:35 2014
New Revision: 1601029

URL: http://svn.apache.org/r1601029
Log:
Fix NPE in OSGi.

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

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/util/PluginManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/util/PluginManager.java?rev=1601029&r1=1601028&r2=1601029&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/util/PluginManager.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/util/PluginManager.java
Fri Jun  6 22:51:35 2014
@@ -136,6 +136,9 @@ public class PluginManager {
         final Enumeration<URL> resources;
         try {
             resources = loader.getResources(PATH + FILENAME);
+            if (resources == null) {
+                return null;
+            }
         } catch (final IOException ioe) {
             LOGGER.warn("Unable to preload plugins", ioe);
             return null;



Mime
View raw message