Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8232685

Make switch expressions final

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P2 P2
    • 14
    • tools
    • None
    • source
    • minimal
    • Java API, Language construct
    • SE

      Summary

      The switch expressions feature, currently preview, is to be made final.

      Problem

      The switch expressions features is in the preview mode for a second release, with overall positive feedback.

      Solution

      The feature is going to be marked as final. The set of legal Java programs is not being changed, only "--enable-preview" will not be needed to enable the feature, it will be enough to use source level 14 or later, implicitly or explicitly.

      Specification

      The final specification draft is attached and is also available for convenience here: http://cr.openjdk.java.net/~gbierman/jep361/jep361-20190927/specs/switch-expressions-jls.html

      Specdiff for updated Trees API (removal of @PreviewFeature annotation and associated text) is attached, and is also available for convenience here: http://cr.openjdk.java.net/~jlahoda/8232684/specdiff.00/overview-summary.html

        1. switch-expressions-jls.html
          242 kB
          Jan Lahoda

            jlahoda Jan Lahoda
            jlahoda Jan Lahoda
            Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: