You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2021/06/19 05:51:36 UTC
[groovy] 01/02: Disable
`SecurityTest.testChecksCreateClassLoaderPermissionForClassLoaderProtectedMethodAccess`
for JDK16+
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch danielsun/tweak-build
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 0a66186b3f02224c9efbf0867473f4b051ecf9d1
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Jun 19 13:48:59 2021 +0800
Disable `SecurityTest.testChecksCreateClassLoaderPermissionForClassLoaderProtectedMethodAccess` for JDK16+
---
src/test/org/codehaus/groovy/reflection/SecurityTest.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/test/org/codehaus/groovy/reflection/SecurityTest.java b/src/test/org/codehaus/groovy/reflection/SecurityTest.java
index d466847..5f24859 100644
--- a/src/test/org/codehaus/groovy/reflection/SecurityTest.java
+++ b/src/test/org/codehaus/groovy/reflection/SecurityTest.java
@@ -241,6 +241,9 @@ public class SecurityTest extends GroovyTestCase {
public void testChecksCreateClassLoaderPermissionForClassLoaderProtectedMethodAccess() throws Exception {
+ // Illegal access to java.lang.ClassLoader.defineClass(java.lang.String,java.nio.ByteBuffer,java.security.ProtectionDomain)
+ if (isAtLeastJdk("16.0")) return;
+
cachedMethodUnderTest = createCachedMethod(ClassLoader.class, "defineClass", new Class[]{String.class, ByteBuffer.class, ProtectionDomain.class});
forbidden = new Permissions();
forbidden.add(new RuntimePermission("createClassLoader"));