<div dir="ltr"><div>Hello,</div><div><br></div><div>Currently when a primitive type is annotated with a `@Documented` annotation, the fqn of the annotation(s)</div><div>is always included in the resulting javadoc, and links aren't properly inserted. For example,</div><div><br></div><div>``</div><div>public abstract void foo(@org.checkerframework.checker.signedness.qual.Unsigned int bar);</div><div>``</div><div><br></div><div>The `bar` parameter, in the resulting javadoc, is documented with the fqn</div><div>`org.checkerframework.checker.signedness.qual.Unsigned` annotation, instead of just `Unsigned` with a link</div><div>to the annotation.</div><div><br></div><div>This patch fixes jdk.javadoc.internal.doclets.formats.html.HtmlLinkFactory::getLink() by introducing special</div><div>handling for primitive types that takes their use annotation into account, and prints the simple type name.</div><div>Note that the type name is currently being derived using PrimitiveType::getKind() instead of</div><div>utils::getTypeName(), this is because the toString() for the default case in getTypeName() will always include</div><div>the annotations, which we want to avoid. I didn't modify utils::getTypeName() since I wasn't sure if a primitive</div><div>specific visit method would mess with any expected behavior.</div><div><br></div><div>Cheers,</div><div>Al</div></div>