On Mon, 13 Apr 2026 12:22:55 GMT, Dusan Balek <[email protected]> wrote:
> With the `SwitchBootstraps.typeSwitch(...)` method, there is a specification > issue (difference between what is written in the method's Javadoc and its > actual behaviour) causing some JCK tests to fail. > > The proposal here is: > Adjust the Javadoc of the `SwitchBootstraps.typeSwitch(...)` method to > reflect the different behaviour of the method when preview features are > enabled/disabled. > > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java line 166: > 164: * both or an {@link IndexOutOfBoundsException} is thrown. > 165: * > 166: * @apiNote This is normative API instead of a separate note; I recommend emphasizing with a preview-style block like: https://github.com/openjdk/valhalla/blob/6ae315c0fe8964a18bba85c5b23c525bf3d4a35f/src/java.base/share/classes/java/lang/Object.java#L36-L45 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30703#discussion_r3073369401
