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:57:47 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes d7a0fb520 -> 13eeb0716


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

Branch: refs/heads/3.1.x-fixes
Commit: 13eeb07168aecc9098d3c11d9aab6ef21cd62780
Parents: d7a0fb5
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:57:30 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/13eeb071/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 2ca6e80..a0bfdf8 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
@@ -315,7 +315,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