This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new d2908d0945 tweak for jdk24+
d2908d0945 is described below
commit d2908d0945cb8778d5956966a678fa0827fbfb05
Author: Paul King <[email protected]>
AuthorDate: Sat Mar 22 19:55:39 2025 +1000
tweak for jdk24+
---
src/test/org/codehaus/groovy/reflection/SecurityTest.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/test/org/codehaus/groovy/reflection/SecurityTest.java
b/src/test/org/codehaus/groovy/reflection/SecurityTest.java
index 7b9cb765c0..37660582aa 100644
--- a/src/test/org/codehaus/groovy/reflection/SecurityTest.java
+++ b/src/test/org/codehaus/groovy/reflection/SecurityTest.java
@@ -35,6 +35,8 @@ import static groovy.test.GroovyAssert.isAtLeastJdk;
public class SecurityTest extends GroovyTestCase {
+ private final boolean skip = Runtime.version().feature() >= 24;
+
@SuppressWarnings("unused")
public class TestClass{
public String publicField;
@@ -84,6 +86,7 @@ public class SecurityTest extends GroovyTestCase {
@SuppressWarnings("removal") // TODO in a future Groovy version remove
reference to SecurityManager & AccessControlException
public void setUp() {
+ if (skip) return;
// Forbidding suppressAccessChecks in the test will make the internal
implementation of some JDK fail,
// so load vm plugin before security manager is installed:
/*
@@ -114,6 +117,7 @@ public class SecurityTest extends GroovyTestCase {
@SuppressWarnings("removal") // TODO in a future Groovy version remove
reference to SecurityManager, for now not run for JDK18+
public void tearDown(){
+ if (skip) return;
System.setSecurityManager(null);
}