RFR: 8331947: Preview creates checkbox for JEP-less preview feature
Chen Liang
liach at openjdk.org
Wed May 22 11:29:02 UTC 2024
On Wed, 22 May 2024 08:39:12 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:
> Please review a simple patch to exclude preview visitor classes meant to support future preview features from the Preview API page.
>
> The test adds an sample element annotated with the new `PreviewFeature.Feature.LANGUAGE_MODEL` constant (which does not have a `@JEP` annotation) to make sure it is not listed in the Preview API page. The test itself does not have to be modified, as it would fail without the change in `PreviewAPIListBuilder.java`.
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/PreviewAPIListBuilder.java line 91:
> 89: if (jep.number == 0) {
> 90: // Remove preview support features without a valid JEP
> 91: jeps.remove(feature);
This feels like we are adding and removing a dummy jep to and from the map every time we encounter the language model feature. Can we just bind a dummy jep to that feature to avoid repeated processing, and only filter at the getter methods?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19344#discussion_r1609781129
More information about the javadoc-dev
mailing list