RFR: 8266082: AssertionError in Annotate.fromAnnotations with -Xdoclint
Vicente Romero
vromero at openjdk.java.net
Tue Jun 15 00:18:44 UTC 2021
On Mon, 14 Jun 2021 13:35:35 GMT, Joel Borggrén-Franck <jfranck at openjdk.org> wrote:
> Javac crashes in Annotate when a javadoc reference contains an annotated type, since attribType expects type annotations to have been attributed.
>
> This proposed fix checks references at parse time to disallow annotated types instead of crashing later on.
>
> Since the exact type of error is known I opted for a new error message to make it easier for the developer to see what is wrong.
>
> Since this affects javac at least as far back as jdk 11 and we are past RDP1 I targeted this for 18.
test/langtools/tools/doclint/CrashInAnnotateTest.java line 31:
> 29: */
> 30:
> 31: /** {@link #equals(@Deprecated Object)} */
I think that the test should include other cases like links to fields and methods in another package etc. with annotations modifying different elements not only method parameters.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4483
More information about the javadoc-dev
mailing list