On Thu, 27 Jun 2024 15:25:36 GMT, Chen Liang <li...@openjdk.org> wrote:
>> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reflecting review feedback. > > src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java line 286: > >> 284: labels[i] = convertedLabel; >> 285: constantsOnly &= >> 286: >> EnumDesc.class.isAssignableFrom(convertedLabel.getClass()); > > Suggestion: > > if (constantsOnly) > constantsOnly = > EnumDesc.class.isAssignableFrom(convertedLabel.getClass()); > > > `&=` does not short-circuit the `isAssignableFrom` evaluation. It’d have to be `&&=`, but I don’t think **Java** supports that. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19906#discussion_r1657679033