cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [2/5] cxf git commit: CXF-6346 Fixed the unit test failures of JAXRSJweJwsTest in systest/rs-security
Date Mon, 13 Apr 2015 03:24:01 GMT
CXF-6346 Fixed the unit test failures of JAXRSJweJwsTest in systest/rs-security


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/5263a8d1
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5263a8d1
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5263a8d1

Branch: refs/heads/3.0.x-fixes
Commit: 5263a8d1e11be0610aa5ddfee1e0b39bbbebcec1
Parents: 1368e8f3
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Mon Apr 13 11:03:05 2015 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Mon Apr 13 11:11:19 2015 +0800

----------------------------------------------------------------------
 .../cxf/systest/jaxrs/security/jwt/JAXRSJweJwsTest.java | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/5263a8d1/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJweJwsTest.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJweJwsTest.java
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJweJwsTest.java
index ad659a5..63233d7 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJweJwsTest.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJweJwsTest.java
@@ -26,8 +26,6 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Properties;
 
-import javax.crypto.Cipher;
-
 import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
 
 import org.apache.cxf.Bus;
@@ -39,7 +37,6 @@ import org.apache.cxf.rs.security.jose.jaxrs.JweWriterInterceptor;
 import org.apache.cxf.rs.security.jose.jaxrs.JwsClientResponseFilter;
 import org.apache.cxf.rs.security.jose.jaxrs.JwsWriterInterceptor;
 import org.apache.cxf.rs.security.jose.jaxrs.PrivateKeyPasswordProvider;
-import org.apache.cxf.rs.security.jose.jwa.AlgorithmUtils;
 import org.apache.cxf.rs.security.jose.jwa.ContentAlgorithm;
 import org.apache.cxf.rs.security.jose.jwa.KeyAlgorithm;
 import org.apache.cxf.rs.security.jose.jwa.SignatureAlgorithm;
@@ -79,13 +76,8 @@ public class JAXRSJweJwsTest extends AbstractBusClientServerTestBase {
     }
     
     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());    
-        }
+        // Still need it for Oracle Java 7 and Java 8
+        Security.addProvider(new BouncyCastleProvider());    
     }
     @AfterClass
     public static void unregisterBouncyCastleIfNeeded() throws Exception {


Mime
View raw message