We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b4a464 commit f89bb66Copy full SHA for f89bb66
src/test/org/codehaus/groovy/transform/ImmutableTransformTest.groovy
@@ -109,8 +109,9 @@ final class ImmutableTransformTest {
109
110
@Test
111
void testCloneableFieldNotCloneableObject() {
112
- // attempting to access the protected clone() method is illegal from JDK16
113
- 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')
114
+ def expectedException = isAtLeastJdk('16.0') && !indy ? IllegalAccessException : CloneNotSupportedException
115
shouldFail expectedException, '''
116
import groovy.transform.*
117
class Dolly {
0 commit comments