You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2022/04/25 13:31:00 UTC

[jira] [Closed] (GROOVY-10595) Compiler should fail for invalid targetBytecode values

     [ https://issues.apache.org/jira/browse/GROOVY-10595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Milles closed GROOVY-10595.
--------------------------------
    Resolution: Duplicate

> Compiler should fail for invalid targetBytecode values
> ------------------------------------------------------
>
>                 Key: GROOVY-10595
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10595
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 4.0.2
>            Reporter: Lóránt Pintér
>            Priority: Major
>
> 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.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)