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

Add SourceVersion.RELEASE_11

    XMLWordPrintable

Details

    • CSR
    • Status: Closed
    • P4
    • Resolution: Approved
    • None
    • core-libs
    • None
    • behavioral
    • minimal
    • 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.
    • Java API
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: