Skip to content

Java Pulled Primitive Patterns After Five Previews. JDK 28 Won't Compile Them.

Article DiscussionsSudoSecurity · · 1 min read

Created
25 Nov 2026
Last reply
4 minutes ago
Replies
0
Views
0
Reactions
0

Discussion of the blog article Java Pulled Primitive Patterns After Five Previews. JDK 28 Won't Compile Them..

Primitive types in patterns, instanceof, and switch previewed in every JDK from 23 to 27. On November 9 the Amber team withdrew the feature, and it won't be in JDK 28 even with --enable-preview. Here's why Valhalla changed the plan, what replaces it, and how to rewrite code that used it.

Read the full article →

Discussion thread — share findings, corrections and follow-ups below.

0 replies

    Post a comment

    Join the discussion to share your thoughts.

    Sign in