On Tue, 23 Jan 2024 14:49:41 GMT, Chen Liang <[email protected]> wrote:
>> Currently in the javadoc tool, the generated class use page does not track
>> the occurrences of a class in the type arguments of the extends or
>> implements list, where they can appear. (See more details on the JBS issue)
>> For example:
>>
>> public class One {}
>>
>>
>> import java.util.*;
>> public class Two extends ArrayList<One> implements Comparator<One> {
>> }
>>
>>
>> This patch proposes to add new 2 usage categories, "Classes that extend
>> types with arguments of type" and "Classes that implement types with
>> arguments of type" to describe the missing usage scenarios.
>>
>> A preview of the new use page with the 2 new categories, generated based on
>> the example above, can be found here:
>> https://cr.openjdk.org/~liach/8323698-javadocuse/doc/class-use/One.html
>
> Chen Liang has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Fix tests
Changes requested by jjg (Reviewer).
test/langtools/jdk/javadoc/doclet/testUseOption/TestUseOption.java line 216:
> 214: public class Two extends ArrayList<One> implements
> Comparator<One> {
> 215: }
> 216: """);
This is not wrong, but if you use `ToolBox.writeJavaFiles` the amount of
boilerplate is reduced.
test/langtools/jdk/javadoc/doclet/testUseOption/TestUseOption.java line 225:
> 223: checkExit(Exit.OK);
> 224:
> 225: checkOrder("class-use/One.html", """
This method call would be easier to read if the text blocks were indented
relative to the opening `"""`. See the other examples earlier in this file and
follow the style of those examples.
-------------
PR Review: https://git.openjdk.org/jdk/pull/17414#pullrequestreview-1849798704
PR Review Comment: https://git.openjdk.org/jdk/pull/17414#discussion_r1470234295
PR Review Comment: https://git.openjdk.org/jdk/pull/17414#discussion_r1470238250