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

Jan Lahoda jlahoda at openjdk.java.net
Thu Apr 21 16:16:47 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:

 - Improving comment, adding more tests.
 - Merge branch 'master' into JDK-8282823
 - Only produce preview warnings for immediate overriders of preview methods.
 - Improving test.
 - 8282823: javac should constrain more uses of preview APIs

-------------

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

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

  Stats: 166962 lines in 2682 files changed: 120988 ins; 33811 del; 12163 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