RFR: 8327824: Type annotation placed on incorrect array nesting levels [v2]
Pavel Rappo
prappo at openjdk.org
Wed Mar 13 15:15:15 UTC 2024
On Tue, 12 Mar 2024 22:06:35 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Please review this patch that fixes placement of type annotations on array types in Javadoc output. This oversight seems to have existed since JDK 8 but was never noticed or reported.
>
> Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits:
>
> - Check output from body instead of summary, summary changes css class when new members are added
> - Add test case for JLS example 10.2-2
> - Merge branch 'master' of https://github.com/openjdk/jdk into fix/jd-array-anno-order
> - Fix whitespace
> - Make sure varargs work too
> - Fix bugs, add tests, fix wrong anticipated test results
> - 8327824: Type annotation placed on incorrect array nesting levels
This PR passes our CI and looks good; thanks.
test/langtools/jdk/javadoc/doclet/testTypeAnnotations/typeannos/DeepArrays.java line 34:
> 32: @ArrA ArrParameterized<@ArrC String @ArrA [] @ArrB []> @ArrC [] @ArrD [] manyNested() { return null; }
> 33: void varargs(@ArrA String @ArrB [] @ArrC [] @ArrD ... arg) {}
> 34: int @ArrA [] mixedStyles(int @ArrB [] @ArrA [] arg) @ArrB [] { return null; } // JLS example 10.2-2
Took me a second or so to remind myself that this is a valid method declaration with the return type `int[][]`:
int[] mixedStyles(int[][] arg) []
-------------
Marked as reviewed by prappo (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/18211#pullrequestreview-1933913639
PR Review Comment: https://git.openjdk.org/jdk/pull/18211#discussion_r1523088118
More information about the javadoc-dev
mailing list