New candidate JEP: 455: Primitive types in Patterns, instanceof, and switch (Preview)

Mark Reinhold mark.reinhold at oracle.com
Mon Sep 25 12:36:50 UTC 2023


https://openjdk.org/jeps/455

  Summary: Enhance pattern matching by allowing primitive type patterns
  to be used in all pattern contexts, align the semantics of primitive
  type patterns with that of instanceof, and extend switch to allow
  primitive constants as case labels. This is a preview language feature.

- Mark


More information about the jdk-dev mailing list