On Wed, 24 Jan 2024 23:50:51 GMT, Aggelos Biboudis <abimpou...@openjdk.org> 
wrote:

>> This is the proposed patch for Primitive types in patterns, instanceof, and 
>> switch (Preview).
>> 
>> Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/
>
> Aggelos Biboudis has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Update year

src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java line 592:

> 590:                                     element.caseLabel() instanceof 
> Double ||
> 591:                                     element.caseLabel() instanceof 
> Boolean)) {
> 592:                             //TODO: should call equals on the constant, 
> not on the selector, check

Looking at the code, it seems like we're already calling equals on the 
constant? (I assume that's to avoid spurious NPEs?)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15638#discussion_r1466143827

Reply via email to