On Tue, 3 Jun 2025 15:07:15 GMT, Nizar Benalla <nbena...@openjdk.org> wrote:

>> Please review this patch to fix a bug where a method can be documented 
>> multiple times 
>> Consider these 4 classes
>> 
>>                     A       (interface)
>>                    / \
>>                   /   \
>> (abstract class)  C     B   ( interface)
>>                   \   /
>>                    \ /
>>                     D       (class)
>> 
>> 
>> Where `A` declares `testA()`, `C` implements it `public final void testA()`, 
>> `B` extends `A` but does *not* override it, `D` extends `C` and implements 
>> `B`
>> 
>> In the generated javadoc, `testA()` is documented twice.
>> 
>> ![Screenshot 2025-05-08 at 15 51 
>> 19](https://github.com/user-attachments/assets/46538e61-1546-4128-8041-296d8491406f)
>> 
>> After the patch, `testA()` is only documented once:
>> 
>> ![Screenshot 2025-05-08 at 15 52 
>> 16](https://github.com/user-attachments/assets/a6b86a21-7104-460c-8f3f-36cee5962eed)
>
> Nizar Benalla has updated the pull request with a new target base due to a 
> merge or a rebase. The incremental webrev excludes the unrelated changes 
> brought in by the merge/rebase. The pull request contains 14 additional 
> commits since the last revision:
> 
>  - Feedback from @hns -  Expand test with new test cases
>  - Merge branch 'master' into duplicate-APIs
>  - revert back to simple earlier fix
>  - revert back to master
>  - Merge branch 'master' into duplicate-APIs
>  - Merge branch 'master' into duplicate-APIs
>  - rename test to be more accurate and simplify code
>  - update javadoc
>  - Merge branch 'master' into duplicate-APIs
>  - new approach - make sure there is no negative effect on JDK doc output
>  - ... and 4 more: https://git.openjdk.org/jdk/compare/8c772620...caeb20ad

test/langtools/jdk/javadoc/doclet/testDuplicateMethodsWarn/TestDuplicateMethods.java
 line 181:

> 179:         checkExit(Exit.OK);
> 180: 
> 181:         checkOutput("sb/U.html", false,

Could you add a positive check to this test and `testHashMapInheritance` that 
the method is documented as expected (as local method in this test, and as 
inherited from the public abstract class in `testHashMapInheritance`), and that 
the method details has a "Specified by: ..." entry for the interface method?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25123#discussion_r2138039054

Reply via email to