RFR: 8321182: SourceExample.SOURCE_14 comment should refer to 'switch expressions' instead of 'text blocks'
Eirik Bjorsnos
duke at openjdk.org
Fri Dec 1 21:07:34 UTC 2023
On Fri, 1 Dec 2023 15:21:37 GMT, Eirik Bjorsnos <duke at openjdk.org> wrote:
> The `Versions` test has a comment referring to 'text blocks' when the feature introduced in Java 14 was actually 'switch expressions'. This looks like a simple copy/paste mistake.
>
> This PR fixes the comment. While touching the code, I also took the liberty to do the following improvements:
>
> - Fixed a typo in `requirements' in a code comment
> - Removed some unused imports
> - Reduced duplication of `JavaCompiler` option conversion by introducing a separate method `javaCompilerOptions`. (Used the 'extract method' refactoring in IntelliJ IDEA which replaced 3 duplicates)
>
> If the last fix is considered gratuitous, let me know and I can simplify the PR.
Thanks for the review Joe! I'll integrate now, but will need a sponsor. This is a low-risk change, but no need to rush in case other reviewers want to take a look.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16924#issuecomment-1836774836
More information about the compiler-dev
mailing list