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

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

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 13
    • Fix Version/s: 14
    • Component/s: specification
    • Labels:

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: