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 54A7318702 for ; Wed, 28 Oct 2015 14:59:56 +0000 (UTC) Received: (qmail 70494 invoked by uid 500); 28 Oct 2015 14:58:58 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 70427 invoked by uid 500); 28 Oct 2015 14:58:58 -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 70418 invoked by uid 99); 28 Oct 2015 14:58:58 -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, 28 Oct 2015 14:58:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 19C18DFF67; Wed, 28 Oct 2015 14:58:58 +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: X-Mailer: ASF-Git Admin Mailer Subject: cxf git commit: Avoiding NPE in JwsJwtCompactproducer Date: Wed, 28 Oct 2015 14:58:58 +0000 (UTC) Repository: cxf Updated Branches: refs/heads/master 71ec36d2c -> ee6125fc8 Avoiding NPE in JwsJwtCompactproducer Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ee6125fc Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ee6125fc Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ee6125fc Branch: refs/heads/master Commit: ee6125fc811fa639175e4ee14e1885a2801cbcaf Parents: 71ec36d Author: Sergey Beryozkin Authored: Wed Oct 28 14:58:39 2015 +0000 Committer: Sergey Beryozkin Committed: Wed Oct 28 14:58:39 2015 +0000 ---------------------------------------------------------------------- .../apache/cxf/rs/security/jose/jwe/JweJwtCompactProducer.java | 2 +- .../apache/cxf/rs/security/jose/jws/JwsJwtCompactProducer.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/ee6125fc/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJwtCompactProducer.java ---------------------------------------------------------------------- diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJwtCompactProducer.java b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJwtCompactProducer.java index 5b65790..f52f9e2 100644 --- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJwtCompactProducer.java +++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJwtCompactProducer.java @@ -38,7 +38,7 @@ public class JweJwtCompactProducer { this(new JweHeaders(), claims); } public JweJwtCompactProducer(JweHeaders joseHeaders, JwtClaims claims) { - headers = new JweHeaders(joseHeaders); + headers = joseHeaders; claimsJson = JwtUtils.claimsToJson(claims); } http://git-wip-us.apache.org/repos/asf/cxf/blob/ee6125fc/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJwtCompactProducer.java ---------------------------------------------------------------------- diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJwtCompactProducer.java b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJwtCompactProducer.java index beaa598..3ac6021 100644 --- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJwtCompactProducer.java +++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJwtCompactProducer.java @@ -17,7 +17,6 @@ * under the License. */ package org.apache.cxf.rs.security.jose.jws; -import org.apache.cxf.rs.security.jose.common.JoseHeaders; import org.apache.cxf.rs.security.jose.jwt.JwtClaims; import org.apache.cxf.rs.security.jose.jwt.JwtToken; import org.apache.cxf.rs.security.jose.jwt.JwtTokenReaderWriter; @@ -30,9 +29,9 @@ public class JwsJwtCompactProducer extends JwsCompactProducer { this(token, null); } public JwsJwtCompactProducer(JwtClaims claims) { - this(new JwtToken(null, claims), null); + this(new JwsHeaders(), claims); } - public JwsJwtCompactProducer(JoseHeaders headers, JwtClaims claims) { + public JwsJwtCompactProducer(JwsHeaders headers, JwtClaims claims) { this(new JwtToken(headers, claims), null); } protected JwsJwtCompactProducer(JwtToken token, JwtTokenReaderWriter w) {