> Removes the preview implementation of Primitive Types in Patterns, 
> `instanceof`, and `switch` from JDK 28. The compiler rejects the withdrawn 
> constructs even with `--enable-preview`. The changes restore the pre-preview 
> language rules while preserving subsequent fixes and update JShell, 
> diagnostics, and regression tests. 
> 
> 1. `SwitchBootstraps.typeSwitch` uses JDK 27’s preview-disabled behavior 
> regardless of whether preview is enabled. It continues to accept primitive 
> selector descriptors and primitive `Class` labels, including exact numeric 
> matching for primitive selectors against primitive `Class` labels. This 
> preserves compatibility with non-preview record-pattern binaries compiled by 
> javac on JDK 23–27. It rejects `Long`, `Float`, `Double`, and `Boolean` 
> constant labels with `IllegalArgumentException`.
> 2. `ExactConversionsSupport` and all its public methods remain available. Its 
> Javadoc removes links to the withdrawn preview specification.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Aggelos Biboudis has updated the pull request incrementally with one additional 
commit since the last revision:

  Add TestJsonNumber.java to test/jdk/ProblemList

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/33919/files
  - new: https://git.openjdk.org/jdk/pull/33919/files/f86472f3..66f9bfeb

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=33919&range=05
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=33919&range=04-05

  Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/33919.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/33919/head:pull/33919

PR: https://git.openjdk.org/jdk/pull/33919

Reply via email to