New candidate JEP: 507: Primitive Types in Patterns, instanceof, and switch (Third Preview)

Glavo zjx001202 at gmail.com
Mon Apr 14 20:54:07 UTC 2025


Hi,

It looks like it has not changed since the original version (JEP 488).
Why does it need a third preview? This makes it not production-ready in JDK
25.
Is there some hidden danger that I'm not aware of that makes people
hesitant about it?

Glavo

On Tue, Apr 15, 2025 at 4:17 AM Mark Reinhold <mark.reinhold at oracle.com>
wrote:

> https://openjdk.org/jeps/507
>
>   Summary: Enhance pattern matching by allowing primitive types in all
>   pattern contexts, and extend instanceof and switch to work with all
>   primitive types.  This is a preview language feature.
>
> - Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20250415/2a1f2ea8/attachment.htm>


More information about the amber-dev mailing list