Skip to content

Commit d1289ab

Browse files
author
xinyu.lin
committed
build(java): add Java 25 profile to enable unsafe memory access for Netty
1 parent bb6f7ee commit d1289ab

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

java/pom.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
<maven.compiler.release>11</maven.compiler.release>
104104
<maven.compiler.target>11</maven.compiler.target>
105105
<surefire.version>3.5.2</surefire.version>
106+
<surefireArgLine></surefireArgLine>
106107
<version.maven-javadoc-plugin>3.11.1</version.maven-javadoc-plugin>
107108
</properties>
108109

@@ -198,7 +199,7 @@
198199
<groupId>org.apache.maven.plugins</groupId>
199200
<artifactId>maven-surefire-plugin</artifactId>
200201
<configuration>
201-
<argLine>--add-opens=java.base/java.nio=ALL-UNNAMED</argLine>
202+
<argLine>${surefireArgLine} --add-opens=java.base/java.nio=ALL-UNNAMED</argLine>
202203
</configuration>
203204
</plugin>
204205

@@ -277,6 +278,15 @@
277278
</reporting>
278279

279280
<profiles>
281+
<profile>
282+
<id>java-25+</id>
283+
<activation>
284+
<jdk>[25,)</jdk>
285+
</activation>
286+
<properties>
287+
<surefireArgLine>--sun-misc-unsafe-memory-access=allow</surefireArgLine>
288+
</properties>
289+
</profile>
280290
<profile>
281291
<id>errorprone</id>
282292
<build>

0 commit comments

Comments
 (0)