RFR: 8321182: SourceExample.SOURCE_14 comment should refer to 'switch expressions' instead of 'text blocks'

Joe Darcy darcy at openjdk.org
Fri Dec 1 17:57:07 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.

Marked as reviewed by darcy (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/16924#pullrequestreview-1760314918


More information about the compiler-dev mailing list