From hannesw at openjdk.org Tue Jul 1 15:16:42 2025 From: hannesw at openjdk.org (Hannes =?UTF-8?B?V2FsbG7DtmZlcg==?=) Date: Tue, 1 Jul 2025 15:16:42 GMT Subject: RFR: 8177100: APIs duplicated in JavaDoc [v8] In-Reply-To: References: <0NrLP37RZ6I7ytBxcNyNFReQVvgu-6p_-HbSbHW9ZRM=.c7fd5ae4-8c8d-48ea-8349-5c92a2f78c71@github.com> Message-ID: On Tue, 24 Jun 2025 10:32:51 GMT, Nizar Benalla 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 17 additional commits since the last revision: > > - review feedback: add positive test > - Merge branch 'master' into duplicate-APIs > - Merge branch 'master' into duplicate-APIs > - 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 > - ... and 7 more: https://git.openjdk.org/jdk/compare/b674cd74...00e7adcc test/langtools/jdk/javadoc/doclet/testDuplicateMethodsWarn/TestDuplicateMethods.java line 219: > 217:
public V()
> 218: > 219: """); That's the doc for the constructor. I was looking for method `testJ` inherited from abstract class `PubJ`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25123#discussion_r2177871010 From nbenalla at openjdk.org Tue Jul 1 15:21:42 2025 From: nbenalla at openjdk.org (Nizar Benalla) Date: Tue, 1 Jul 2025 15:21:42 GMT Subject: RFR: 8177100: APIs duplicated in JavaDoc [v8] In-Reply-To: References: <0NrLP37RZ6I7ytBxcNyNFReQVvgu-6p_-HbSbHW9ZRM=.c7fd5ae4-8c8d-48ea-8349-5c92a2f78c71@github.com> Message-ID: On Tue, 1 Jul 2025 15:14:05 GMT, Hannes Walln?fer wrote: >> 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 17 additional commits since the last revision: >> >> - review feedback: add positive test >> - Merge branch 'master' into duplicate-APIs >> - Merge branch 'master' into duplicate-APIs >> - 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 >> - ... and 7 more: https://git.openjdk.org/jdk/compare/c984557a...00e7adcc > > test/langtools/jdk/javadoc/doclet/testDuplicateMethodsWarn/TestDuplicateMethods.java line 219: > >> 217:
public V()
>> 218: >> 219: """); > > That's the doc for the constructor. I was looking for method `testJ` inherited from abstract class `PubJ`. I believe `testJ` does not have it's own doc in `V.html`. It only appears in the "methods inherited from class J" section ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25123#discussion_r2177883731 From hannesw at openjdk.org Tue Jul 1 17:14:42 2025 From: hannesw at openjdk.org (Hannes =?UTF-8?B?V2FsbG7DtmZlcg==?=) Date: Tue, 1 Jul 2025 17:14:42 GMT Subject: RFR: 8177100: APIs duplicated in JavaDoc [v8] In-Reply-To: References: <0NrLP37RZ6I7ytBxcNyNFReQVvgu-6p_-HbSbHW9ZRM=.c7fd5ae4-8c8d-48ea-8349-5c92a2f78c71@github.com> Message-ID: On Tue, 1 Jul 2025 15:18:52 GMT, Nizar Benalla wrote: >> test/langtools/jdk/javadoc/doclet/testDuplicateMethodsWarn/TestDuplicateMethods.java line 219: >> >>> 217:
public V()
>>> 218: >>> 219: """); >> >> That's the doc for the constructor. I was looking for method `testJ` inherited from abstract class `PubJ`. > > I believe `testJ` does not have it's own doc in `V.html`. It only appears in the "methods inherited from class J" section Yes, that's what should be tested. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25123#discussion_r2178140084 From nbenalla at openjdk.org Fri Jul 4 12:17:32 2025 From: nbenalla at openjdk.org (Nizar Benalla) Date: Fri, 4 Jul 2025 12:17:32 GMT Subject: RFR: 8177100: APIs duplicated in JavaDoc [v9] In-Reply-To: <0NrLP37RZ6I7ytBxcNyNFReQVvgu-6p_-HbSbHW9ZRM=.c7fd5ae4-8c8d-48ea-8349-5c92a2f78c71@github.com> References: <0NrLP37RZ6I7ytBxcNyNFReQVvgu-6p_-HbSbHW9ZRM=.c7fd5ae4-8c8d-48ea-8349-5c92a2f78c71@github.com> Message-ID: > 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 19 additional commits since the last revision: - Fix test based on feedback - Merge branch 'master' into duplicate-APIs - review feedback: add positive test - Merge branch 'master' into duplicate-APIs - Merge branch 'master' into duplicate-APIs - 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 - ... and 9 more: https://git.openjdk.org/jdk/compare/a2470982...a34c4d51 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/25123/files - new: https://git.openjdk.org/jdk/pull/25123/files/00e7adcc..a34c4d51 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=25123&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25123&range=07-08 Stats: 9881 lines in 490 files changed: 4908 ins; 2962 del; 2011 mod Patch: https://git.openjdk.org/jdk/pull/25123.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/25123/head:pull/25123 PR: https://git.openjdk.org/jdk/pull/25123 From hannesw at openjdk.org Fri Jul 4 12:17:32 2025 From: hannesw at openjdk.org (Hannes =?UTF-8?B?V2FsbG7DtmZlcg==?=) Date: Fri, 4 Jul 2025 12:17:32 GMT Subject: RFR: 8177100: APIs duplicated in JavaDoc [v9] In-Reply-To: References: <0NrLP37RZ6I7ytBxcNyNFReQVvgu-6p_-HbSbHW9ZRM=.c7fd5ae4-8c8d-48ea-8349-5c92a2f78c71@github.com> Message-ID: On Fri, 4 Jul 2025 12:14:28 GMT, Nizar Benalla 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 19 additional commits since the last revision: > > - Fix test based on feedback > - Merge branch 'master' into duplicate-APIs > - review feedback: add positive test > - Merge branch 'master' into duplicate-APIs > - Merge branch 'master' into duplicate-APIs > - 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 > - ... and 9 more: https://git.openjdk.org/jdk/compare/a2470982...a34c4d51 Thanks, looks good. And sorry for being nit-picky about the tests, but it's better to have all details covered. ------------- Marked as reviewed by hannesw (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/25123#pullrequestreview-2986952404 From nbenalla at openjdk.org Fri Jul 4 12:17:33 2025 From: nbenalla at openjdk.org (Nizar Benalla) Date: Fri, 4 Jul 2025 12:17:33 GMT Subject: RFR: 8177100: APIs duplicated in JavaDoc [v8] In-Reply-To: References: <0NrLP37RZ6I7ytBxcNyNFReQVvgu-6p_-HbSbHW9ZRM=.c7fd5ae4-8c8d-48ea-8349-5c92a2f78c71@github.com> Message-ID: On Tue, 1 Jul 2025 17:12:05 GMT, Hannes Walln?fer wrote: >> I believe `testJ` does not have it's own doc in `V.html`. It only appears in the "methods inherited from class J" section > > Yes, that's what should be tested. Fixed in [a34c4d5](https://github.com/openjdk/jdk/pull/25123/commits/a34c4d5102855163ca2261b394bfc4d534c34b2c). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25123#discussion_r2185203183 From nbenalla at openjdk.org Fri Jul 4 12:20:44 2025 From: nbenalla at openjdk.org (Nizar Benalla) Date: Fri, 4 Jul 2025 12:20:44 GMT Subject: RFR: 8177100: APIs duplicated in JavaDoc [v9] In-Reply-To: References: <0NrLP37RZ6I7ytBxcNyNFReQVvgu-6p_-HbSbHW9ZRM=.c7fd5ae4-8c8d-48ea-8349-5c92a2f78c71@github.com> Message-ID: On Fri, 4 Jul 2025 12:17:32 GMT, Nizar Benalla 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 19 additional commits since the last revision: > > - Fix test based on feedback > - Merge branch 'master' into duplicate-APIs > - review feedback: add positive test > - Merge branch 'master' into duplicate-APIs > - Merge branch 'master' into duplicate-APIs > - 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 > - ... and 9 more: https://git.openjdk.org/jdk/compare/51dab163...a34c4d51 Thank you for the reviews Hannes and Chen. I will integrate once CI jobs are completed on all platforms. Better to be careful. ------------- PR Comment: https://git.openjdk.org/jdk/pull/25123#issuecomment-3035990222 From liach at openjdk.org Fri Jul 4 12:27:41 2025 From: liach at openjdk.org (Chen Liang) Date: Fri, 4 Jul 2025 12:27:41 GMT Subject: RFR: 8177100: APIs duplicated in JavaDoc [v9] In-Reply-To: References: <0NrLP37RZ6I7ytBxcNyNFReQVvgu-6p_-HbSbHW9ZRM=.c7fd5ae4-8c8d-48ea-8349-5c92a2f78c71@github.com> Message-ID: On Fri, 4 Jul 2025 12:17:32 GMT, Nizar Benalla 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 19 additional commits since the last revision: > > - Fix test based on feedback > - Merge branch 'master' into duplicate-APIs > - review feedback: add positive test > - Merge branch 'master' into duplicate-APIs > - Merge branch 'master' into duplicate-APIs > - 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 > - ... and 9 more: https://git.openjdk.org/jdk/compare/193b8c36...a34c4d51 The test update looks good. ------------- Marked as reviewed by liach (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/25123#pullrequestreview-2987001946 From nbenalla at openjdk.org Fri Jul 4 15:12:49 2025 From: nbenalla at openjdk.org (Nizar Benalla) Date: Fri, 4 Jul 2025 15:12:49 GMT Subject: Integrated: 8177100: APIs duplicated in JavaDoc In-Reply-To: <0NrLP37RZ6I7ytBxcNyNFReQVvgu-6p_-HbSbHW9ZRM=.c7fd5ae4-8c8d-48ea-8349-5c92a2f78c71@github.com> References: <0NrLP37RZ6I7ytBxcNyNFReQVvgu-6p_-HbSbHW9ZRM=.c7fd5ae4-8c8d-48ea-8349-5c92a2f78c71@github.com> Message-ID: On Thu, 8 May 2025 14:53:41 GMT, Nizar Benalla 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) This pull request has now been integrated. Changeset: f2d2eef9 Author: Nizar Benalla URL: https://git.openjdk.org/jdk/commit/f2d2eef988c57cc9f6194a8fd5b2b422035ee68f Stats: 234 lines in 2 files changed: 220 ins; 6 del; 8 mod 8177100: APIs duplicated in JavaDoc Reviewed-by: liach, hannesw ------------- PR: https://git.openjdk.org/jdk/pull/25123