You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2015/10/20 14:02:58 UTC
[2/3] 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/498a3c2f
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/498a3c2f
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/498a3c2f
Branch: refs/heads/master
Commit: 498a3c2f415c119cd82e1e5779eee4e103755a89
Parents: 62d70e9
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Tue Oct 20 12:35:18 2015 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Oct 20 12:35:18 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/498a3c2f/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 27baf82..689faea 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;
@@ -58,17 +56,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 {
@@ -99,7 +91,6 @@ public class JAXRSJwsJsonTest extends AbstractBusClientServerTestBase {
if (!SecurityTestUtil.checkUnrestrictedPoliciesInstalled()) {
return;
}
-
String address = "https://localhost:" + PORT + "/jwejwsjsonhmac";
List<?> extraProviders = Arrays.asList(new JacksonJsonProvider(),
new JweWriterInterceptor(),