RFR: 8282823: javac should constrain more uses of preview APIs [v2]

Jan Lahoda jlahoda at openjdk.java.net
Mon Mar 14 20:19:16 UTC 2022

> Consider a class or interface with a method marked as preview. Subclassing the class or implementing the interface by itself should not cause a preview error/warning (as that would be problematic for Loom), but overriding the method should produce a preview error/warning.
> This patch adds the error/warning in case a preview method is overridden.

Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:

  Only produce preview warnings for immediate overriders of preview methods.


  - all: https://git.openjdk.java.net/jdk/pull/7774/files
  - new: https://git.openjdk.java.net/jdk/pull/7774/files/a16300ad..3b8ac122

 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7774&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7774&range=00-01

  Stats: 177 lines in 3 files changed: 151 ins; 1 del; 25 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7774.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7774/head:pull/7774

PR: https://git.openjdk.java.net/jdk/pull/7774

More information about the compiler-dev mailing list