You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bu...@apache.org on 2019/05/16 08:25:33 UTC

[cxf] 02/02: CXF-7953: apply workaround for JDK 9 & 10

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

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

commit 8c9895c7b214616221aef78c84512b6e2662b58b
Author: amarkevich <am...@talend.com>
AuthorDate: Thu May 16 11:24:52 2019 +0300

    CXF-7953: apply workaround for JDK 9 & 10
---
 .../java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java | 4 ++--
 .../apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java | 4 ++--
 .../apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java   | 2 +-
 .../apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java   | 2 +-
 .../java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java  | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
index 2fe6763..f065125 100644
--- a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
+++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
@@ -71,10 +71,10 @@ public abstract class AbstractTypeTestClient
             && "GMonth".equals(name));
     }
 
-    public static void initClient(Class<?> clz, QName serviceName,
+    public static void initClient(QName serviceName,
                                   QName portName, String wsdlPath)
         throws Exception {
-        URL wsdlLocation = clz.getResource(wsdlPath);
+        URL wsdlLocation = AbstractTypeTestClient.class.getResource(wsdlPath);
         assertNotNull("Could not load wsdl " + wsdlPath, wsdlLocation);
         testDocLiteral = wsdlPath.contains("doclit") || wsdlPath.contains("-corba");
         testXMLBinding = wsdlPath.contains("_xml");
diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java
index 6ec9e34..df27554 100644
--- a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java
+++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java
@@ -200,7 +200,7 @@ public class CORBADocLitClientTypeTest extends AbstractTypeTestClient5 {
                 "DerivedEmptyBaseEmptyChoice"
             ));
         }
-        if (JavaUtils.isJava11Compatible()) {
+        if (JavaUtils.isJava9Compatible()) {
             NOT_WORKING_TESTS.addAll(Arrays.asList(
                 "SimpleRestriction",
                 "SimpleRestriction4",
@@ -216,7 +216,7 @@ public class CORBADocLitClientTypeTest extends AbstractTypeTestClient5 {
     public static void startServers() throws Exception {
         boolean ok = launchServer(CORBADocLitServerImpl.class, true);
         assertTrue("failed to launch server", ok);
-        initClient(AbstractTypeTestClient5.class, SERVICE_NAME, PORT_NAME, WSDL_PATH);
+        initClient(SERVICE_NAME, PORT_NAME, WSDL_PATH);
     }
     @AfterClass
     public static void deleteRefFile() throws Exception {
diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java
index eb26744..d47db3f 100644
--- a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java
+++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java
@@ -50,7 +50,7 @@ public class SOAPDocLitClientTypeTest extends AbstractTypeTestClient5 {
     public static void startServers() throws Exception {
         boolean ok = launchServer(SOAPDocLitServerImpl.class, true);
         assertTrue("failed to launch server", ok);
-        initClient(AbstractTypeTestClient5.class, SERVICE_NAME, PORT_NAME, WSDL_PATH);
+        initClient(SERVICE_NAME, PORT_NAME, WSDL_PATH);
     }
 
     @Test
diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java
index 1a39e5b..b09e0c2 100644
--- a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java
+++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java
@@ -44,7 +44,7 @@ public class SOAPRpcLitClientTypeTest extends AbstractTypeTestClient5 {
     public static void startServers() throws Exception {
         boolean ok = launchServer(SOAPRpcLitServerImpl.class, true);
         assertTrue("failed to launch server", ok);
-        initClient(AbstractTypeTestClient5.class, SERVICE_NAME, PORT_NAME, WSDL_PATH);
+        initClient(SERVICE_NAME, PORT_NAME, WSDL_PATH);
     }
 
 }
diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java
index 185d59e..83f47d2 100644
--- a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java
+++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java
@@ -41,6 +41,6 @@ public class XMLClientTypeTest extends AbstractTypeTestClient5 {
     public static void startServers() throws Exception {
         boolean ok = launchServer(XMLServerImpl.class, true);
         assertTrue("failed to launch server", ok);
-        initClient(AbstractTypeTestClient5.class, SERVICE_NAME, PORT_NAME, WSDL_PATH);
+        initClient(SERVICE_NAME, PORT_NAME, WSDL_PATH);
     }
 }