This is an automated email from the ASF dual-hosted git repository. paulk pushed a commit to branch GROOVY_3_0_X in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push: new f89bb668d4 make non-indy test more lenient (both non and indy cases) f89bb668d4 is described below commit f89bb668d41c65648dbc43b38c9396a61364d261 Author: Paul King <pa...@asert.com.au> AuthorDate: Sun Mar 3 14:31:56 2024 +1000 make non-indy test more lenient (both non and indy cases) --- src/test/org/codehaus/groovy/transform/ImmutableTransformTest.groovy | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/org/codehaus/groovy/transform/ImmutableTransformTest.groovy b/src/test/org/codehaus/groovy/transform/ImmutableTransformTest.groovy index ec982fab04..e2e8d63605 100644 --- a/src/test/org/codehaus/groovy/transform/ImmutableTransformTest.groovy +++ b/src/test/org/codehaus/groovy/transform/ImmutableTransformTest.groovy @@ -109,8 +109,9 @@ final class ImmutableTransformTest { @Test void testCloneableFieldNotCloneableObject() { - // attempting to access the protected clone() method is illegal from JDK16 - def expectedException = isAtLeastJdk('16.0') ? IllegalAccessException : CloneNotSupportedException + // non-indy bytecode attempts to access the protected clone() method which is illegal from JDK16 + def indy = System.getProperty('groovy.target.indy') + def expectedException = isAtLeastJdk('16.0') && !indy ? IllegalAccessException : CloneNotSupportedException shouldFail expectedException, ''' import groovy.transform.* class Dolly {