RFR: 8338133: Cleanup direct use of `new HtmlTree`

Jonathan Gibbons jjg at openjdk.org
Tue Sep 3 18:35:18 UTC 2024


On Tue, 3 Sep 2024 17:54:59 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/HtmlTree.java line 389:
>> 
>>> 387:     }
>>> 388: 
>>> 389:     private static HtmlTree BR_INSTANCE = unmodifiableTree(HtmlTag.BR);
>> 
>> There is a failing test in `tools/javac/T8003967/DetectMutableStaticFields.java` because of this and the other new static fields in `HtmlTree.java` not being `final`. The fields should be declared as `final` anyway.
>
> Thanks; I guess that test is not in my standard set of tests for javadoc: mea culpa

Ideally the test should not be buried in tools/javac. But that's a separate matter.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20778#discussion_r1742501711


More information about the javadoc-dev mailing list