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. ------------- Commit messages: - 8266082: AssertionError in Annotate.fromAnnotations with -Xdoclint Changes: https://git.openjdk.java.net/jdk/pull/4483/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4483&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8266082 Stats: 99 lines in 5 files changed: 98 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/4483.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4483/head:pull/4483 PR: https://git.openjdk.java.net/jdk/pull/4483
