Be able to build on JDK17 (#11500)

Motivation:

As the release of JDK17 is getting closer and there are ea builds already we should ensure we can actually build netty with it.

Modifications:

- Add profile for JDK17
- Remove test-code that would fail with JDK17 due the changes in 4f4d0f5366.

Result:

Be able to build and run testsuite with JDK17
This commit is contained in:
Norman Maurer 2021-07-23 14:14:30 +02:00 committed by GitHub
parent a1c3e3670d
commit 0cb25f9fdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 1 deletions

View File

@ -1103,7 +1103,6 @@ public class OpenSslEngineTest extends SSLEngineTest {
SSLParameters parameters = new SSLParameters();
Java8SslTestUtils.setSNIMatcher(parameters, name);
engine.setSSLParameters(parameters);
assertTrue(unwrapEngine(engine).checkSniHostnameMatch(name));
assertFalse(unwrapEngine(engine).checkSniHostnameMatch("other".getBytes(CharsetUtil.UTF_8)));
} finally {
cleanupServerSslEngine(engine);

24
pom.xml
View File

@ -182,6 +182,30 @@
<testJvm />
</properties>
</profile>
<profile>
<id>java17</id>
<activation>
<jdk>17</jdk>
</activation>
<properties>
<!-- Not use alpn agent as Java11+ supports alpn out of the box -->
<argLine.alpnAgent />
<argLine.java9.extras />
<!-- Export some stuff which is used during our tests -->
<argLine.java9>--illegal-access=deny ${argLine.java9.extras}</argLine.java9>
<forbiddenapis.skip>true</forbiddenapis.skip>
<!-- Needed because of https://issues.apache.org/jira/browse/MENFORCER-275 -->
<enforcer.plugin.version>3.0.0-M3</enforcer.plugin.version>
<!-- 1.4.x does not work in Java10+ -->
<jboss.marshalling.version>2.0.5.Final</jboss.marshalling.version>
<!-- This is the minimum supported by Java12+ -->
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<!-- pax-exam does not work on latest Java12 EA 22 build -->
<skipOsgiTestsuite>true</skipOsgiTestsuite>
</properties>
</profile>
<!-- JDK16 -->
<profile>
<id>java16</id>