Integrated: 8363917: SwitchBootstraps.enumSwitch() args not checked as documented
Jan Lahoda
jlahoda at openjdk.org
Wed Oct 8 05:38:12 UTC 2025
On Mon, 22 Sep 2025 11:00:37 GMT, Jan Lahoda <jlahoda at openjdk.org> 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
This pull request has now been integrated.
Changeset: 86211956
Author: Jan Lahoda <jlahoda at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/862119565db311fe0e02e383fd3493601ed23ea8
Stats: 68 lines in 2 files changed: 50 ins; 0 del; 18 mod
8363917: SwitchBootstraps.enumSwitch() args not checked as documented
Reviewed-by: liach
-------------
PR: https://git.openjdk.org/jdk/pull/27422
More information about the core-libs-dev
mailing list