Skip to content

8381898: SwitchBootstraps::typeSwitch() not accepting Float, Double types#30703

Open
dbalek wants to merge 2 commits intoopenjdk:masterfrom
dbalek:dbalek/8381898
Open

8381898: SwitchBootstraps::typeSwitch() not accepting Float, Double types#30703
dbalek wants to merge 2 commits intoopenjdk:masterfrom
dbalek:dbalek/8381898

Conversation

@dbalek
Copy link
Copy Markdown
Contributor

@dbalek dbalek commented Apr 13, 2026

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 following changes in the behaviour of the method:

  • the method no longer requires a target to be of a reference type (primitive type targets are allowed now)
  • primitive type labels are allowed now if the preview features are enabled


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires CSR request JDK-8382163 to be approved

Issues

  • JDK-8381898: SwitchBootstraps::typeSwitch() not accepting Float, Double types (Bug - P2)
  • JDK-8376162: SwitchBoostraps.typeSwitch does not throw IAE as expected (Bug - P3)
  • JDK-8382163: SwitchBootstraps::typeSwitch() not accepting Float, Double types (CSR)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/30703/head:pull/30703
$ git checkout pull/30703

Update a local copy of the PR:
$ git checkout pull/30703
$ git pull https://git.openjdk.org/jdk.git pull/30703/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 30703

View PR using the GUI difftool:
$ git pr show -t 30703

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/30703.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Apr 13, 2026

👋 Welcome back dbalek! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 13, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Apr 13, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 13, 2026

@dbalek The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@dbalek dbalek changed the title 8381898: SwitchBootstraps::typeSwitch() not accepting Float, Double types. 8381898: SwitchBootstraps::typeSwitch() not accepting Float, Double types Apr 13, 2026
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 13, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge bot commented Apr 13, 2026

Webrevs

@AlanBateman
Copy link
Copy Markdown
Contributor

/csr

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Apr 13, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 13, 2026

@AlanBateman has indicated that a compatibility and specification (CSR) request is needed for this pull request.

@dbalek please create a CSR request for issue JDK-8381898 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

@dbalek
Copy link
Copy Markdown
Contributor Author

dbalek commented Apr 14, 2026

/issue add JDK-8376162

@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 14, 2026

@dbalek
Adding additional issue to issue list: 8376162: SwitchBoostraps.typeSwitch does not throw IAE as expected.

Copy link
Copy Markdown
Member

@liach liach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, you can proceed to finalize the CSR too.

Copy link
Copy Markdown
Member

@biboudis biboudis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-libs core-libs-dev@openjdk.org csr Pull request needs approved CSR before integration rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

4 participants