Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-10595

Compiler should fail for invalid targetBytecode values

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 4.0.2
    • None
    • Compiler
    • 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

          Activity

            People

              Unassigned Unassigned
              lptr Lóránt Pintér
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: