RFR: 8315735: VerifyError when switch statement used with synchronized block [v2]
Rémi Forax
forax at openjdk.org
Wed Sep 6 21:17:40 UTC 2023
On Wed, 6 Sep 2023 20:33:12 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
>> 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
>
> To be honest, I don't see a big difference between "scan", "scanner" and "treeScanner" - these describe the type of the variable, but not its purpose. So, I've used `hasTryScanner`, which conveys the purpose as well. Not a big reason to use less readable tricks with anonymous and var either - javac normally uses local classes to perform tasks like this.
I agree, that we should not spend too much time on that code.
At the same time, `scan.scan(...)` is not very readable, I believe that `scanner` or `treeScanner` are better names.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15584#discussion_r1317840041
More information about the compiler-dev
mailing list