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 DD71411C00 for ; Wed, 17 Sep 2014 12:21:17 +0000 (UTC) Received: (qmail 65718 invoked by uid 500); 17 Sep 2014 12:21:17 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 65654 invoked by uid 500); 17 Sep 2014 12:21:17 -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 65645 invoked by uid 99); 17 Sep 2014 12:21:17 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Sep 2014 12:21:17 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 865CCA18356; Wed, 17 Sep 2014 12:21:17 +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: <6658ab9dd2b24aad9c69c80cf5ff397d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: Preventing NPE in a JWE test Date: Wed, 17 Sep 2014 12:21:17 +0000 (UTC) Repository: cxf Updated Branches: refs/heads/master 30529297e -> 1fa008dd1 Preventing NPE in a JWE test Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/1fa008dd Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1fa008dd Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1fa008dd Branch: refs/heads/master Commit: 1fa008dd160dde9c4d614700556ba9f0d8f17fdd Parents: 3052929 Author: Sergey Beryozkin Authored: Wed Sep 17 13:20:51 2014 +0100 Committer: Sergey Beryozkin Committed: Wed Sep 17 13:20:51 2014 +0100 ---------------------------------------------------------------------- .../cxf/rs/security/oauth2/jwe/JweCompactReaderWriterTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/1fa008dd/rt/rs/security/oauth-parent/oauth2-jwt/src/test/java/org/apache/cxf/rs/security/oauth2/jwe/JweCompactReaderWriterTest.java ---------------------------------------------------------------------- diff --git a/rt/rs/security/oauth-parent/oauth2-jwt/src/test/java/org/apache/cxf/rs/security/oauth2/jwe/JweCompactReaderWriterTest.java b/rt/rs/security/oauth-parent/oauth2-jwt/src/test/java/org/apache/cxf/rs/security/oauth2/jwe/JweCompactReaderWriterTest.java index a540ee6..ef70a39 100644 --- a/rt/rs/security/oauth-parent/oauth2-jwt/src/test/java/org/apache/cxf/rs/security/oauth2/jwe/JweCompactReaderWriterTest.java +++ b/rt/rs/security/oauth-parent/oauth2-jwt/src/test/java/org/apache/cxf/rs/security/oauth2/jwe/JweCompactReaderWriterTest.java @@ -175,7 +175,7 @@ public class JweCompactReaderWriterTest extends Assert { } JweEncryptionProvider encryptor = new WrappedKeyJweEncryption( new JweHeaders(Algorithm.RSA_OAEP.getJwtName(), jwtKeyName), - key.getEncoded(), + key == null ? null : key.getEncoded(), INIT_VECTOR_A1, new RSAOaepKeyEncryptionAlgorithm(publicKey, Algorithm.RSA_OAEP.getJwtName()));