From ff9667b1f9d9da7f31b2243df1be4a3305d71a9c Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Mon, 30 Mar 2020 21:25:08 +0200 Subject: [PATCH] Add profile to build on JDK 14 (#10148) Motivation: JDK 14 was released and need some special settings to be able to build with. Also there seems to be one regression that we need to workaround for now. Modifications: - Add maven profile for JDK 14 - Update blockhound version to be able to work on JDK 14 - Add workaround for possible JDK 14 regression Result: Be able to build on JDK 14 --- .../io/netty/handler/ssl/SSLEngineTest.java | 7 +++- pom.xml | 34 ++++++++++++++----- transport-blockhound-tests/pom.xml | 9 +++++ 3 files changed, 41 insertions(+), 9 deletions(-) diff --git a/handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java b/handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java index 12a17c1140..0e8c6c5315 100644 --- a/handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java +++ b/handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java @@ -2990,7 +2990,12 @@ public abstract class SSLEngineTest { assertTrue(serverSession.getPacketBufferSize() > 0); assertNotNull(clientSession.getSessionContext()); - assertNotNull(serverSession.getSessionContext()); + + // Workaround for possible JDK 14 regression. + // See http://mail.openjdk.java.net/pipermail/security-dev/2020-March/021488.html + if (PlatformDependent.javaVersion() < 14) { + assertNotNull(serverSession.getSessionContext()); + } Object value = new Object(); diff --git a/pom.xml b/pom.xml index b64453c241..9d942711f2 100644 --- a/pom.xml +++ b/pom.xml @@ -97,6 +97,24 @@ + + + java14 + + 14 + + + + + true + + 3.0.0-M3 + + 2.0.5.Final + + true + + java13 @@ -104,11 +122,11 @@ 13 - + true - 3.0.0-M1 + 3.0.0-M3 2.0.5.Final @@ -126,11 +144,11 @@ --illegal-access=deny ${argLine.java9.extras} - + true - 3.0.0-M1 + 3.0.0-M3 2.0.5.Final @@ -148,11 +166,11 @@ --illegal-access=deny ${argLine.java9.extras} - + true - 3.0.0-M1 + 3.0.0-M3 2.0.5.Final @@ -174,7 +192,7 @@ true - 3.0.0-M1 + 3.0.0-M3 2.0.5.Final @@ -661,7 +679,7 @@ io.projectreactor.tools blockhound - 1.0.2.RELEASE + 1.0.3.RELEASE diff --git a/transport-blockhound-tests/pom.xml b/transport-blockhound-tests/pom.xml index ba0ee7f94f..4b88da2d41 100644 --- a/transport-blockhound-tests/pom.xml +++ b/transport-blockhound-tests/pom.xml @@ -41,6 +41,15 @@ -XX:+AllowRedefinitionToAddDeleteMethods + + java14 + + 14 + + + -XX:+AllowRedefinitionToAddDeleteMethods + +