On Thu, 14 Nov 2024 23:40:37 GMT, Nizar Benalla <nbena...@openjdk.org> wrote:
> Please review this patch to improve the javadoc preview header. The parent > bug include more details. > > This is meant to prevent a bug where, if a non preview class extend an > `@PreviewFeature` interface, the Javadoc displays `Programs can only use > <<Type>> when preview features are enabled` when the API can be used without > enable preview features as long as we don't refer to any methods in the > supertype > > This is specifically the case in #17543. Here is the javadoc output > [AsymmetricKey](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8343239-2/docs/api/java.base/java/security/AsymmetricKey.html) > after merging this branch with the PR `298420: PEM API: Implementation > (Preview) #17543`. The only files affected by this change are the class > `DEREncodable` and it's Subinterfaces. > > One other bug I noticed is that, on the `DEREncodable` page, it's direct > subinterfaces had the superscript `PREVIEW` link. I've added a condition to > remove it. src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties line 443: > 441: to permanent features of the Java Platform.<br> > 442: doclet.NonPreviewPreview=Programs can use {0} without enabling preview > features. \ > 443: Programs can only reference the preview API by name when preview > features are enabled. > Programs can only reference the preview API by name when preview features are > enabled. Should we reword like `Programs can only use {0} as {1} when preview features are enabled.` where `{1}` is (the list of) preview feature class(es) or interface(s) this existing class or interface extends/implements. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22126#discussion_r1843055291