Repository: cxf Updated Branches: refs/heads/2.7.x-fixes fdd9c9707 -> 03dbe4676
[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/03dbe467 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/03dbe467 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/03dbe467 Branch: refs/heads/2.7.x-fixes Commit: 03dbe4676968d58afd9c3ec932ba1b89979beb61 Parents: fdd9c97 Author: Sergey Beryozkin <[email protected]> Authored: Thu Jun 26 10:38:20 2014 +0100 Committer: Sergey Beryozkin <[email protected]> Committed: Thu Jun 26 10:38:20 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/03dbe467/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()) {
