Release
Withdrawing the Primitive Patterns Preview Feature
The Brief
- Development of Primitive Types in Patterns, instanceof, and switch has ceased.
- The draft JEP 8393282, which would have been the sixth preview of this feature, will be withdrawn.
- The feature will be removed from JDK 28.
Why it matters
Developers who planned to use primitive type patterns in instanceof or switch in JDK 28 will not get this preview feature, so code relying on it will need a different approach.
Who’s affected
- Java developers experimenting with primitive patterns in instanceof and switch
- Teams planning features for JDK 28
- JDK 28
- #java
- #jdk
- #jep
- #preview-features
- #pattern-matching
We have decided to cease development of Primitive Types in Patterns, instanceof, and switch. The draft JEP https://openjdk.org/jeps/8393282 that would have been the sixth preview of this feature will be withdrawn, and the feature will be removed from JDK 28.