You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2017/06/09 11:40:04 UTC

cxf git commit: NPE fix if the resource can't be loaded

Repository: cxf
Updated Branches:
  refs/heads/master 089ba5825 -> aaa8fde1e


NPE fix if the resource can't be loaded


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

Branch: refs/heads/master
Commit: aaa8fde1e631c53252d822d4ff24689f186cc668
Parents: 089ba58
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Fri Jun 9 12:39:53 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Fri Jun 9 12:39:53 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/rs/security/jose/common/JoseUtils.java    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/aaa8fde1/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseUtils.java b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseUtils.java
index d9b7281..428c775 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseUtils.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseUtils.java
@@ -196,6 +196,9 @@ public final class JoseUtils {
     public static Properties loadProperties(String propertiesLocation, Bus bus) throws Exception {
         Properties props = new Properties();
         try (InputStream is = getResourceStream(propertiesLocation, bus)) {
+            if (is == null) {
+                throw new JoseException("The properties file " + propertiesLocation + " could not be read");
+            }
             props.load(is);
         }
         return props;