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

1.5: Robust handling of code using essential APIs associated with preview features

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 14
    • 13
    • specification

    Description

      Per http://openjdk.java.net/jeps/12#Relationship-to-Java-SE-APIs:

      - The use of an essential API element associated with a preview feature must cause either a compile-time error or a suppressible warning, depending on whether preview features are disabled or enabled respectively. JLS 1.5 must specify the presence of the error/warning, and enumerate which types/methods in Java SE 14 cause it. JLS 9.6.4.5 must record that the warning is suppressible via `@SuppressWarnings("preview")`.

      - The use of a reflective API element associated with a preview feature is worthy of a warning regardless of whether preview features are disabled or enabled -- but technically this is a compiler-specific warning, not a JLS-mandated warning. Reflective APIs, whether in java.*, javax.*, or com.sun.source.*, are outside the JLS's scope.

      Attachments

        Issue Links

          Activity

            People

              abuckley Alex Buckley
              abuckley Alex Buckley
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: