RFR: 8315735: VerifyError when switch statement used with synchronized block [v2]

Rémi Forax forax at openjdk.org
Wed Sep 6 19:50:42 UTC 2023


On Wed, 6 Sep 2023 19:16:19 GMT, ExE Boss <duke at openjdk.org> wrote:

>> Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Reflecting review feedback.
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java line 1281:
> 
>> 1279:     //where:
>> 1280:         private boolean hasTry(JCSwitchExpression tree) {
>> 1281:             var scan = new TreeScanner() {
> 
> I think `scanner` might be a better name for this:
> Suggestion:
> 
>             var scanner = new TreeScanner() {

I agree, the first guideline of the excellent guide written by Stuart Marks about the usage of 'var' is "Choose variable names that provide useful information [1].

[1] https://openjdk.org/projects/amber/guides/lvti-style-guide#G1

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15584#discussion_r1317750801


More information about the compiler-dev mailing list