cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [2/4] cxf git commit: NPE fix
Date Mon, 27 Apr 2015 15:40:05 GMT
NPE fix


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

Branch: refs/heads/master
Commit: 3f719f99dbb6ba9ae961d90323e7f8c55961e616
Parents: 3e8d71b
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Apr 27 15:35:51 2015 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Apr 27 16:39:58 2015 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/3f719f99/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
index 70f534d..241fe6b 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
@@ -236,6 +236,9 @@ public final class JwkUtils {
         if (keyStoreLoc != null) {
             try {
                 InputStream is = ResourceUtils.getResourceStream(keyStoreLoc, bus);
+                if (is == null) {
+                    throw new SecurityException("Error in loading keystore location: " +
keyStoreLoc);
+                }
                 keyContent = IOUtils.readStringFromStream(is);
             } catch (Exception ex) {
                 throw new SecurityException(ex);


Mime
View raw message