Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B73E91873A for ; Wed, 11 Nov 2015 13:57:47 +0000 (UTC) Received: (qmail 10945 invoked by uid 500); 11 Nov 2015 13:57:47 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 10892 invoked by uid 500); 11 Nov 2015 13:57:47 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 10846 invoked by uid 99); 11 Nov 2015 13:57:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2015 13:57:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 48818E0AD2; Wed, 11 Nov 2015 13:57:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sergeyb@apache.org To: commits@cxf.apache.org Message-Id: <79bc340ce28043e99512bb61126b4d2f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cxf git commit: Adding an npe guard to KeyManagementUtils.getKeyAlgorithm Date: Wed, 11 Nov 2015 13:57:47 +0000 (UTC) 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 Authored: Wed Nov 11 13:56:10 2015 +0000 Committer: Sergey Beryozkin 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); }