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

Add SourceVersion.RELEASE_11

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      Only perverse programs would be broken by the addition of a new enum constant as the last constant. The contract for latest() and latestSupported() is intended to vary by release.
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Add a new enum constant RELEASE_11 to javax.lang.model.SourceVersion for the JDK 11 release.

      Problem

      The SourceVersion enum needs an enum constant for each release being modeled.

      Solution

      Add the enum constant RELEASE_11.

      Specification

      --- old/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java 2017-12-11 22:32:47.930062197 -0800
      +++ new/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java 2017-12-11 22:32:47.586062182 -0800
      @@ -159,7 +159,15 @@
            *
            * @since 10
            */
      -     RELEASE_10;
      +     RELEASE_10,
      +
      +    /**
      +     * The version recognized by the Java Platform, Standard Edition
      +     * 11.
      +     *
      +     * @since 11
      +     */
      +     RELEASE_11;

      Also, the output of SourceVersion.latest() is changed to RELEASE_11.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              darcy Joe Darcy
              Reporter:
              darcy Joe Darcy
              Reviewed By:
              Sundararajan Athijegannathan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: