You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2017/11/13 07:47:12 UTC

[cxf] branch master updated: [CXF-7559]enhance the way to handle java version in CipherSuitesTest

This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new fd55efa  [CXF-7559]enhance the way to handle java version in CipherSuitesTest
fd55efa is described below

commit fd55efab2eacf7e63bb367b438f49993eba62bc7
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Mon Nov 13 15:46:59 2017 +0800

    [CXF-7559]enhance the way to handle java version in CipherSuitesTest
---
 .../systest/https/ciphersuites/CipherSuitesTest.java | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/systests/transports/src/test/java/org/apache/cxf/systest/https/ciphersuites/CipherSuitesTest.java b/systests/transports/src/test/java/org/apache/cxf/systest/https/ciphersuites/CipherSuitesTest.java
index 0394128..c97cc76 100644
--- a/systests/transports/src/test/java/org/apache/cxf/systest/https/ciphersuites/CipherSuitesTest.java
+++ b/systests/transports/src/test/java/org/apache/cxf/systest/https/ciphersuites/CipherSuitesTest.java
@@ -239,14 +239,10 @@ public class CipherSuitesTest extends AbstractBusClientServerTestBase {
     @org.junit.Test
     public void testRC4Included() throws Exception {
         String version = System.getProperty("java.version");
-        try {
-            if (1.8D == Double.parseDouble(version.substring(0, 3))) {
-                // RC4 not supported in JDK8
-                return;
-            }
-        } catch (Exception e) {
+        if (version.length() > 1 && 1.8D <= Double.parseDouble(version.substring(0, 3))
+            || version.length() == 1 && 9 <= Integer.parseInt(version.substring(0, 1))) {
+            // RC4 not supported since JDK8
             return;
-            //java9
         }
         SpringBusFactory bf = new SpringBusFactory();
         URL busFile = CipherSuitesTest.class.getResource("ciphersuites-rc4-client.xml");
@@ -273,14 +269,10 @@ public class CipherSuitesTest extends AbstractBusClientServerTestBase {
     @org.junit.Test
     public void testRC4IncludedAsync() throws Exception {
         String version = System.getProperty("java.version");
-        try {
-            if (1.8D == Double.parseDouble(version.substring(0, 3))) {
-                // RC4 not supported in JDK8
-                return;
-            }
-        } catch (Exception e) {
+        if (version.length() > 1 && 1.8D <= Double.parseDouble(version.substring(0, 3))
+            || version.length() == 1 && 9 <= Integer.parseInt(version.substring(0, 1))) {
+            // RC4 not supported since JDK8
             return;
-            //java9
         }
         SpringBusFactory bf = new SpringBusFactory();
         URL busFile = CipherSuitesTest.class.getResource("ciphersuites-rc4-client.xml");

-- 
To stop receiving notification emails like this one, please contact
['"commits@cxf.apache.org" <co...@cxf.apache.org>'].