Repository: cxf Updated Branches: refs/heads/2.6.x-fixes 144ab3915 -> 71c73e4a2
[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/71c73e4a Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/71c73e4a Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/71c73e4a Branch: refs/heads/2.6.x-fixes Commit: 71c73e4a2604e6f03a07d2c198544500eb91bc57 Parents: 144ab39 Author: Sergey Beryozkin <[email protected]> Authored: Thu Jun 26 10:38:20 2014 +0100 Committer: Sergey Beryozkin <[email protected]> Committed: Thu Jun 26 10:39:35 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/71c73e4a/api/src/main/java/org/apache/cxf/common/util/PropertiesLoaderUtils.java ---------------------------------------------------------------------- diff --git a/api/src/main/java/org/apache/cxf/common/util/PropertiesLoaderUtils.java b/api/src/main/java/org/apache/cxf/common/util/PropertiesLoaderUtils.java index ee09367..ad6cfa2 100644 --- a/api/src/main/java/org/apache/cxf/common/util/PropertiesLoaderUtils.java +++ b/api/src/main/java/org/apache/cxf/common/util/PropertiesLoaderUtils.java @@ -65,6 +65,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()) {
