cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Adding an npe guard to KeyManagementUtils.getKeyAlgorithm
Date Wed, 11 Nov 2015 13:59:04 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 4f06e0011 -> 946270c56


Adding an npe guard to KeyManagementUtils.getKeyAlgorithm


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

Branch: refs/heads/3.0.x-fixes
Commit: 946270c56cc9af0852167aefdd0573777c66f44d
Parents: 4f06e00
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Nov 11 13:56:10 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed Nov 11 13:58:50 2015 +0000

----------------------------------------------------------------------
 .../org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/946270c5/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
index a53e7a8..8d399e9 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
@@ -310,7 +310,7 @@ public final class KeyManagementUtils {
         return chain == null ? null : chain.toArray(new X509Certificate[]{});
     }
     public static String getKeyAlgorithm(Message m, Properties props, String propName, String
defaultAlg) {
-        String algo = props.getProperty(propName);
+        String algo = props != null ? props.getProperty(propName) : null;
         if (algo == null && m != null) {
             algo = (String)m.getContextualProperty(propName);
         }


Mime
View raw message