cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: [CXF-5822] Fixing a possible NPE in PropertiesLoaderUtils, patch from Christoph Eßer applied
Date Thu, 26 Jun 2014 09:32:31 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 5daca2d2b -> 403a4fb83


[CXF-5822] Fixing a possible NPE in PropertiesLoaderUtils, patch from Christoph Eßer applied


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/403a4fb8
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/403a4fb8
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/403a4fb8

Branch: refs/heads/master
Commit: 403a4fb83a23b6bae60bc12eb48c357d1f822040
Parents: 5daca2d
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Thu Jun 26 10:32:12 2014 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Thu Jun 26 10:32:12 2014 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/common/util/PropertiesLoaderUtils.java   | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/403a4fb8/core/src/main/java/org/apache/cxf/common/util/PropertiesLoaderUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/util/PropertiesLoaderUtils.java b/core/src/main/java/org/apache/cxf/common/util/PropertiesLoaderUtils.java
index 9c58e38..e7c91d3 100644
--- a/core/src/main/java/org/apache/cxf/common/util/PropertiesLoaderUtils.java
+++ b/core/src/main/java/org/apache/cxf/common/util/PropertiesLoaderUtils.java
@@ -63,6 +63,10 @@ public final class PropertiesLoaderUtils {
                                                Logger logger, Level level, String msg)
         throws IOException {
         Properties properties = new Properties();
+        // Set default class loader if neccessary
+        if (classLoader == null) {
+            classLoader = PropertiesLoaderUtils.class.getClassLoader();
+        }
         Enumeration<URL> urls = classLoader.getResources(resourceName);
 
         while (urls.hasMoreElements()) {


Mime
View raw message