From 3772398700f4ae2496fd2870fbfa189e8b8dd218 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Fri, 16 Sep 2016 18:44:10 +0200 Subject: [PATCH] Explicit sun.nio.ch export for Netty's NioEventLoopGroup on JDK 9 Issue: SPR-14645 --- build.gradle | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/build.gradle b/build.gradle index 11fd949ba1b..5516ed987bc 100644 --- a/build.gradle +++ b/build.gradle @@ -600,6 +600,11 @@ project("spring-messaging") { testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}") testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}") } + + if (JavaVersion.current().java9Compatible) { + // Reactor2TcpClient's use of Netty requires access to sun.nio.ch.SelectorImpl + test.jvmArgs(["--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED"]) + } } project("spring-tx") { @@ -787,6 +792,11 @@ project("spring-web") { testRuntime("org.jboss.xnio:xnio-nio:${xnioVersion}") testRuntime("org.jboss.logging:jboss-logging:3.3.0.Final") } + + if (JavaVersion.current().java9Compatible) { + // Netty4ClientHttpRequestFactory requires access to sun.nio.ch.SelectorImpl + test.jvmArgs(["--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED"]) + } } project("spring-web-reactive") { @@ -827,6 +837,11 @@ project("spring-web-reactive") { testRuntime("org.jboss.logging:jboss-logging:3.3.0.Final") testRuntime("org.webjars:underscorejs:1.8.3") } + + if (JavaVersion.current().java9Compatible) { + // ReactorClientHttpConnector requires access to sun.nio.ch.SelectorImpl + test.jvmArgs(["--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED"]) + } } project("spring-orm") { @@ -980,6 +995,11 @@ project("spring-websocket") { testRuntime("org.jboss.xnio:xnio-nio:${xnioVersion}") testRuntime("org.jboss.logging:jboss-logging:3.3.0.Final") } + + if (JavaVersion.current().java9Compatible) { + // Reactor2TcpClient's use of Netty requires access to sun.nio.ch.SelectorImpl + test.jvmArgs(["--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED"]) + } } project("spring-test") {