Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8256299 Implement JEP 396: Strongly Encapsulate JDK Internals by Default
  3. JDK-8256358

Release Note: JEP 396: Strongly Encapsulate JDK Internals by Default

    XMLWordPrintable

Details

    • Verified

    Description

      Strongly encapsulate all internal elements of the JDK by default, except
      for [critical internal APIs][crit] such as `sun.misc.Unsafe`. Allow end
      users to choose the relaxed strong encapsulation that has been the
      default since JDK 9.

      With this change, the default value of the launcher option
      [`--illegal-access`][relax] is now `deny` rather than `permit`. As a
      consequence, existing code that uses most internal classes, methods, or
      fields of the JDK will fail to run. Such code can be made to run on
      JDK 16 by specifying `--illegal-access=permit`. That option will,
      however, be removed in a future release.

      For further details, please see [JEP 396](https://openjdk.java.net/jeps/396).

      [crit]: https://openjdk.java.net/jeps/260#Description
      [relax]: https://openjdk.java.net/jeps/261#Relaxed-strong-encapsulation

      Attachments

        Activity

          People

            mr Mark Reinhold
            mr Mark Reinhold
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: