On Mon, 29 Aug 2022 23:31:26 GMT, Jonathan Gibbons <[email protected]> wrote:
> Excellent analysis and write up.
Thank you, Jonathan. And thanks for the quick review!
> (Just) for the record, I will note there is potentially another case that
> could be tested, ...
I noticed several cases in the JDK where the problem occurs (see list above):
* abstract class with public members,
* abstract sealed class with public members,
* public sealed interface that has members with package access,
* public interface that has members with package access, and
* interface with package access that has members with package access.
I thought of writing test cases for each of these, but then just settled on the
last item for a simple test case that detects the bug and verifies the fix. Let
me know if you think I should add some of the other cases.
> test/langtools/jdk/javadoc/doclet/testIndexInherited/TestIndexInherited.java
> line 111:
>
>> 109: public static void main(String... args) throws Exception {
>> 110: TestIndexInherited tester = new TestIndexInherited();
>> 111: tester.runTests(m -> new Object[]{Path.of(m.getName())});
>
> These days, you can simplify this down to just `tester.runTests();`. The
> implication of the method will check the signature of the test methods and
> provide the appropriate path automatically.
Done.
-------------
PR: https://git.openjdk.org/jdk/pull/10070