On Fri, 15 Sep 2023 16:04:28 GMT, Hannes Wallnöfer <hann...@openjdk.org> wrote:

>> My original intention with this cleanup was to keep using 
>> `[Html]IndexBuilder' for both the "All Classes" and the main index, but just 
>> improve separation of code and naming of classes. However, I then discovered 
>> two things:
>> 
>>  - The "All Classes" page is so simple to build that it doesn't justify 
>> using a complex builder class. In fact, moving the necessary functionality 
>> from `IndexBuilder` to `AllClassesIndexWriter` just added about a dozen 
>> lines of code to the latter, while making `IndexBuilder` much simpler by 
>> removing its dual purpose.
>>  - The separation of code between `toolkit.util.IndexBuilder` and 
>> `formats.html.HtmlIndexBuilder`, although seemingly random at first sight, 
>> actually reflects the usage of functionality provided by the respective 
>> packages. Although with a single output format the separation between these 
>> packages is not as important as it used to be, it is still nice to keep 
>> things separated.
>> 
>> Based on these two findings, I decided to pull the "All Classes" code into 
>> "AllClassesIndexWriter", but maintain the implementation of 
>> `[Html]IndexBuilder` across the two classes/packages. Although the base 
>> `IndexBuilder` class is technically able to function on its own without the 
>> HTML-specific enhancements, I made the class abstract in order to point out 
>> that the HTML enhancements in `HtmlIndexBuilder` are actually essential for 
>> our us.
>
> Hannes Wallnöfer has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Update 
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesIndexWriter.java
>   
>   Remove whitespace
>   
>   Co-authored-by: Andrey Turbanov <turban...@gmail.com>

Approved.

I assume all tests pass, and that JDK API docs are not affected.

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

Marked as reviewed by jjg (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15746#pullrequestreview-1640390416

Reply via email to