On Tue, 15 Jun 2021 14:40:51 GMT, Vicente Romero <vrom...@openjdk.org> wrote:
>> Joel Borggrén-Franck has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8266082: Use nodynamiccopyright and add test cases > > test/langtools/tools/doclint/CrashInAnnotateTest.out line 4: > >> 2: CrashInAnnotateTest.java:14:5: compiler.err.proc.messager: annotations >> not allowed >> 3: CrashInAnnotateTest.java:16:10: compiler.warn.proc.messager: no comment >> 4: CrashInAnnotateTest.java:19:5: compiler.err.proc.messager: syntax error >> in reference > > I think that these syntax errors are because the annotation is fully > qualified, you should use `@Deprecated` instead of `java.lang.@Deprecated` Yes and no. The parts other than the arguments are parsed in a different way that doesn't allow a space, see DocCommentParser.java:417 . Since there can be no space it is impossible to insert a type annotation in a type. I have updated the test with a few more examples. I'm not looking to unify parsing in this PR, IMO it is enough to 1) not crash and 2) provide a friendly message. ------------- PR: https://git.openjdk.java.net/jdk/pull/4483