You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2014/06/26 11:32:31 UTC

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

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 <sb...@talend.com>
Authored: Thu Jun 26 10:32:12 2014 +0100
Committer: Sergey Beryozkin <sb...@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()) {