RFR: 8331947: Preview creates checkbox for JEP-less preview feature [v3]

Chen Liang liach at openjdk.org
Thu May 30 13:15:12 UTC 2024


On Thu, 23 May 2024 13:59:19 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`.
>
> Hannes Wallnöfer has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:
> 
>  - Merge branch 'master' of https://git.openjdk.org/jdk into JDK-8331947
>  - Only include preview features with a JEP
>  - JDK-8331947: Preview creates checkbox for JEP-less preview feature

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/PreviewAPIListBuilder.java line 88:

> 86:                 return new JEP(number, title, status);
> 87:             }
> 88:             return null;

I think we can create a `NULL_SENTINEL` special constant JEP object to indicate a feature has no JEP (like how many collection implementations use a sentinel for null)

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/SummaryAPIListBuilder.java line 70:

> 68:      * @param configuration the current configuration of the doclet
> 69:      */
> 70:     public SummaryAPIListBuilder(BaseConfiguration configuration) {

Suggestion:

    protected SummaryAPIListBuilder(BaseConfiguration configuration) {

Nit: abstract classes.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19344#discussion_r1620691115
PR Review Comment: https://git.openjdk.org/jdk/pull/19344#discussion_r1620685264


More information about the javadoc-dev mailing list