Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
3.0.9
-
None
-
None
-
Java11 vs Java17
Windows10, Ubuntu
Description
The following code works on Java11 but breaks on Java17
import groovy.transform.AutoClone @AutoClone class Foo { File file String string } def foo = new Foo(file: new File('bar'), string: 'qux') foo.clone()
The error is
groovy.lang.MissingMethodException: No signature of method: java.lang.Object.clone() is applicable for argument types: () values: [] Possible solutions: collect(), collect(groovy.lang.Closure), collect(java.util.Collection, groovy.lang.Closure), find(), any(), use([Ljava.lang.Object;)
This can be reproduced in GroovyConsole
Attachments
Issue Links
- is a clone of
-
GROOVY-10405 @AutoClone breaks in Java17 for File properties
- Closed