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

Eirik Bjorsnos duke at openjdk.org
Fri Dec 1 21:18:43 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.

This pull request has now been integrated.

Changeset: 2f299e4a
Author:    Eirik Bjorsnos <eirbjo at gmail.com>
Committer: Joe Darcy <darcy at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/2f299e4a732a945175a9d334d69fedafbe0ca25b
Stats:     51 lines in 1 file changed: 19 ins; 28 del; 4 mod

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

Reviewed-by: darcy

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

PR: https://git.openjdk.org/jdk/pull/16924


More information about the compiler-dev mailing list