On Mon, 22 Sep 2025 11:00:37 GMT, Jan Lahoda <[email protected]> wrote:
> The bug points out the implementation and the documentation for > `SwitchBootstraps.enumSwitch` don't completely agree, and that some points in > the documentation could be more clear. This PR adjusts the documentation for > `SwitchBootstraps`. No behavioral changes. Tests added to verify the behavior. > > The adjustments are: > - `invocationName` can be `null` > - being explicit the `labels` array for `enumSwitch` may constain references > to enum constants that don't exist > - disallowing empty strings in the `labels` array > - rephrasing of the handling of the situation when no element in the `labels` > array matches java.lang.invoke.ConstantBootstraps has a class-level comment that unused arguments may be null. Do you think we should use a similar comment? ------------- PR Comment: https://git.openjdk.org/jdk/pull/27422#issuecomment-3324774696
