[jdk17] RFR: 8268766: Desugaring of pattern matching enum switch should be improved [v4]

Jan Lahoda jlahoda at openjdk.java.net
Wed Jun 23 11:58:10 UTC 2021


On Tue, 22 Jun 2021 20:43:03 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Updating javadoc, as suggested.
>
> src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java line 175:
> 
>> 173:      * Bootstrap method for linking an {@code invokedynamic} call site that
>> 174:      * implements a {@code switch} on a target of an enum type. The static
>> 175:      * arguments are used to encode the case labels associated to the switch
> 
> `String` and `Class` should appear in code blocks perhaps, or link tags? Also, I think this text could be improved by splitting the sentence by using a bullet list:
> 
> 
> The static arguments are used to encode the case labels associated to the switch
> construct, where each label can be encoded in two ways:
> * as a String value, which represents the name of the enum constant associated with the label
> * as a Class value, which represents the enum type associated with a type test pattern

Thanks! I've (tried to) updated the javadoc as suggested.

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

PR: https://git.openjdk.java.net/jdk17/pull/81


More information about the compiler-dev mailing list