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 CD80510D43 for ; Tue, 20 Oct 2015 13:00:57 +0000 (UTC) Received: (qmail 43906 invoked by uid 500); 20 Oct 2015 13:00:51 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 43742 invoked by uid 500); 20 Oct 2015 13:00:51 -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 43567 invoked by uid 99); 20 Oct 2015 13:00:51 -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; Tue, 20 Oct 2015 13:00:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 71C37E0ACB; Tue, 20 Oct 2015 13:00:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: coheigea@apache.org To: commits@cxf.apache.org Date: Tue, 20 Oct 2015 13:00:55 -0000 Message-Id: <13ef4e9c10db45c9b53b49271cedcc0b@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [5/5] cxf git commit: Fixing failing JDK8 test Fixing failing JDK8 test Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/7be1f888 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7be1f888 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7be1f888 Branch: refs/heads/3.0.x-fixes Commit: 7be1f888e0e32a895a586a4a4a3de6efc54b7f5e Parents: 5b81488 Author: Colm O hEigeartaigh Authored: Tue Oct 20 12:35:18 2015 +0100 Committer: Colm O hEigeartaigh Committed: Tue Oct 20 14:00:45 2015 +0100 ---------------------------------------------------------------------- .../systest/jaxrs/security/jwt/JAXRSJwsJsonTest.java | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/7be1f888/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJwsJsonTest.java ---------------------------------------------------------------------- diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJwsJsonTest.java b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJwsJsonTest.java index 01eecc9..90ad37d 100644 --- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJwsJsonTest.java +++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJwsJsonTest.java @@ -29,7 +29,6 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; -import javax.crypto.Cipher; import javax.ws.rs.BadRequestException; import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; @@ -41,7 +40,6 @@ import org.apache.cxf.rs.security.jose.jaxrs.JweClientResponseFilter; import org.apache.cxf.rs.security.jose.jaxrs.JweWriterInterceptor; import org.apache.cxf.rs.security.jose.jaxrs.JwsJsonClientResponseFilter; import org.apache.cxf.rs.security.jose.jaxrs.JwsJsonWriterInterceptor; -import org.apache.cxf.rs.security.jose.jwa.AlgorithmUtils; import org.apache.cxf.systest.jaxrs.security.Book; import org.apache.cxf.systest.jaxrs.security.SecurityTestUtil; import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase; @@ -63,17 +61,11 @@ public class JAXRSJwsJsonTest extends AbstractBusClientServerTestBase { public static void startServers() throws Exception { assertTrue("server did not launch correctly", launchServer(BookServerJwsJson.class, true)); - registerBouncyCastleIfNeeded(); + registerBouncyCastle(); } - private static void registerBouncyCastleIfNeeded() throws Exception { - try { - // Java 8 apparently has it - Cipher.getInstance(AlgorithmUtils.AES_GCM_ALGO_JAVA); - } catch (Throwable t) { - // Oracle Java 7 - Security.addProvider(new BouncyCastleProvider()); - } + private static void registerBouncyCastle() throws Exception { + Security.addProvider(new BouncyCastleProvider()); } @AfterClass public static void unregisterBouncyCastleIfNeeded() throws Exception { @@ -104,7 +96,6 @@ public class JAXRSJwsJsonTest extends AbstractBusClientServerTestBase { if (SKIP_AES_GCM_TESTS || !SecurityTestUtil.checkUnrestrictedPoliciesInstalled()) { return; } - String address = "https://localhost:" + PORT + "/jwejwsjsonhmac"; List extraProviders = Arrays.asList(new JacksonJsonProvider(), new JweWriterInterceptor(),