RFR: 7903809: Invalid source release N with --enable-preview [v3]

Christian Stein cstein at openjdk.org
Thu Sep 12 10:34:16 UTC 2024


On Thu, 12 Sep 2024 08:42:36 GMT, Christian Stein <cstein at openjdk.org> wrote:

>> Please review this change to prevent "invalid source release N with --enable-preview" errors for when an explicit compile task targets a different JDK feature release number then the JDK under test (running the compilation).
>
> Christian Stein has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Use `String` comparison to support versions < 9, for example `"1.8"`

Had to rewrite the comparsion to use `String`'s `equal(...)` instead of `int`'s `==` due to `"1.8"` not being parsable by `Integer.parseInt(...)`. The new code make use of the existing `getTestJDKVersion().name()` accessor that handles Java version below 9.

With [20766/checks](https://github.com/openjdk/jdk/pull/20766/checks) showing no errors so far, I'll integrate this change set and continue with testing higher tiers.

-------------

PR Comment: https://git.openjdk.org/jtreg/pull/226#issuecomment-2345877204


More information about the jtreg-dev mailing list