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/17 08:50:57 UTC
[groovy] branch danielsun/tweak-build updated: Disable
`groovy.bugs.Groovy8815.testGenerics` 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
The following commit(s) were added to refs/heads/danielsun/tweak-build by this push:
new d3b41d9 Disable `groovy.bugs.Groovy8815.testGenerics` for JDK16+
d3b41d9 is described below
commit d3b41d9ee516a1e16c488d858ef35c190a2bc033
Author: Daniel Sun <su...@apache.org>
AuthorDate: Thu Jun 17 16:50:45 2021 +0800
Disable `groovy.bugs.Groovy8815.testGenerics` for JDK16+
---
src/test/groovy/bugs/Groovy8815.groovy | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/test/groovy/bugs/Groovy8815.groovy b/src/test/groovy/bugs/Groovy8815.groovy
index 8a8c9f4..e520b8c 100644
--- a/src/test/groovy/bugs/Groovy8815.groovy
+++ b/src/test/groovy/bugs/Groovy8815.groovy
@@ -22,10 +22,17 @@ import org.codehaus.groovy.control.CompilerConfiguration
import org.codehaus.groovy.tools.javac.JavaAwareCompilationUnit
import org.junit.Test
+import static groovy.test.GroovyAssert.isAtLeastJdk
+import static org.junit.Assume.assumeTrue
+
final class Groovy8815 {
@Test
void testGenerics() {
+ // illegal access to `java.lang.reflect.Method.getGenericSignature`, i.e. `method.genericSignature` in the test
+ // but illegal access is not allowed by default since JDK 16
+ assumeTrue(!isAtLeastJdk('16.0'))
+
def config = new CompilerConfiguration(
targetDirectory: File.createTempDir(),
jointCompilationOptions: [memStub: true]