Skip to content

Commit cbb61cf

Browse files
committed
Explicitly allow setting the SecurityManager in tests
java.lang.SecurityManager has been deprecated and marked for removal. While Java 17 JDKs displayed only a warning when setting the SecurityManager, Java 21 JDKs will throw an UnsupportedOperationException. This can be prevented by setting the system property java.security.manager.allow to true. Only when issue https://bugs.openjdk.org/browse/JDK-8199704 has been addressed, we have the possibility to address this and remove the use of the SecurityManager.
1 parent 76c811f commit cbb61cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/samm-cli/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
</systemPropertyVariables>
170170
<forkCount>1</forkCount>
171171
<reuseForks>false</reuseForks>
172-
<argLine>-Xmx6g</argLine>
172+
<argLine>-Xmx6g -Djava.security.manager=allow</argLine>
173173
<skip>${skip.maven.surefire}</skip>
174174
<reportsDirectory>${project.build.directory}/${testreports.surefire}</reportsDirectory>
175175
<!-- Do NOT wildcard include *Test.java, because then we would also run the SammCliIntegrationTest -->

0 commit comments

Comments
 (0)