Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
4.0.2
-
None
-
None
Description
When calling CompilerConfiguration.setTragetByteCode() with an invalid value, the user could be left thinking they set the value properly, when they didn't. One example is using "8" instead of the valid "1.8". If the method failed for invalid values it would be easy to detect such a problem.
Note that this problem is mostly hidden for Groovy 3, where Java 8 is the default target bytecode version. However, in Groovy 4 the target bytecode version defaults to the Java version being used. Setting this value to "8" thus results in the expected behavior in Groovy 3, but produces incorrect behavior in Groovy 4 when used with a Java version other than 8.
Attachments
Issue Links
- is related to
-
GROOVY-10278 CompilerConfiguration: improve target bytecode selection
- Closed