A class or interface that permits a subclass or subinterface that is part of a preview feature marks the permitting type as preview feature and generates a preview notice for it. No preview message should be generated as the permitted preview subclass does not affect normal use of the type.
This is relevant in the context of JEP 401 where java.lang.classfile.Attribute and java.lang.classfile.ClassElement permit a new preview interface LoadableDescriptorsAttribute, but should not be marked as preview APIs. --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - An API is not preview if it permits preview subtypes Changes: https://git.openjdk.org/jdk/pull/31505/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=31505&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8386589 Stats: 38 lines in 2 files changed: 36 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/31505.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/31505/head:pull/31505 PR: https://git.openjdk.org/jdk/pull/31505
