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

Make switch expressions final

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P2
    • Resolution: Approved
    • Fix Version/s: 14
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      source
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API, Language construct
    • Scope:
      SE

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: