cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/2] git commit: Avoid a NPE on no Crypto instance
Date Mon, 28 Apr 2014 17:42:20 GMT
Repository: cxf
Updated Branches:
  refs/heads/master b9a7d7dd2 -> 1b0e2fe2d


Avoid a NPE on no Crypto instance


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

Branch: refs/heads/master
Commit: 099c710c1b83e6dc91ebfde728dd05a445feaee6
Parents: b9a7d7d
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Apr 28 16:36:51 2014 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Apr 28 16:37:12 2014 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/099c710c/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/SecurityUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/SecurityUtils.java
b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/SecurityUtils.java
index f849bf8..51db0d2 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/SecurityUtils.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/SecurityUtils.java
@@ -88,6 +88,9 @@ public final class SecurityUtils {
     
     public static X509Certificate[] getCertificates(Crypto crypto, String user)
         throws Exception {
+        if (crypto == null) {
+            throw new Exception("Crypto instance is null");
+        }
         CryptoType cryptoType = new CryptoType(CryptoType.TYPE.ALIAS);
         cryptoType.setAlias(user);
         X509Certificate[] issuerCerts = crypto.getX509Certificates(cryptoType);


Mime
View raw message