cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: NPE fix if the resource can't be loaded
Date Fri, 09 Jun 2017 11:44:24 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes ab78f3ac5 -> 02221113b


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/02221113
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/02221113
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/02221113

Branch: refs/heads/3.1.x-fixes
Commit: 02221113b4c85bc643f18c82a7d59e0179d400ac
Parents: ab78f3a
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Jun 9 12:39:53 2017 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Jun 9 12:40:13 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/02221113/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 12741c8..7752162 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;


Mime
View raw message