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:56:26 GMT
Repository: cxf
Updated Branches:
  refs/heads/master d6043fd1c -> 3b302262c


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

Branch: refs/heads/master
Commit: 3b302262ca78035fd76eb03e7f51bd67189f8031
Parents: d6043fd
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:56:10 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/3b302262/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