On Wed, 5 May 2021 10:27:57 GMT, Pavel Rappo <pra...@openjdk.org> wrote:
> > > Yes, it can. This is covered by > > test/langtools/jdk/javadoc/doclet/testTagMisuse/TestTagMisuse.java > > I think it's an empty string that ReferenceTree.getSignature can return, not > null. To check that, I modified DCReference as follows and ran the tests > (including TestTagMisuse), which all passed: > > ``` > DCReference(String signature, JCTree.JCExpression moduleName, JCTree > qualExpr, Name member, List<JCTree> paramTypes) { > - this.signature = signature; > + this.signature = Objects.requireNonNull(signature); > ``` You are right, it is it is not `DCReference` that returns `null` but `CommentHelper#getReferencedSignature`, which returns null as default value if there is no reference object to get the signature from. Among the uses of this method there is one that doesn't do a null check, but there's also one that handles `null` differently than `""`. I don't think the issue is serious enough to warrant a separate bug, so I'll just add the missing null check in my final commit. ------------- PR: https://git.openjdk.java.net/jdk/pull/3754