-
Bug
-
Resolution: Unresolved
-
P4
-
18
Here's an example. A doc comment for java.lang.invoke.CallSite#setTarget contains the following link: {@linkplain MethodType#equals equal to}. Now, there are two methods called "equals" in the MethodType class: one public and one private method. While IntelliJ IDEA seems to be choosing the private method, which is naturally inaccessible from the outside of MethodType, javadoc (tool) choses the public method, which is inherited from the java.lang.Object. The specification seems silent on that.
I haven't yet checked what happens in either javadoc (tool) or IntelliJ IDEA if there are more than one accessible same-named method.
I also assume there might be some clarification required for the case where a field and a method share a name and the link does not contain enough information to disambiguate them. For example,
private int hashCode;
@Override
public int hashCode() {
return super.hashCode();
}
/**
* {@link #hashCode}
*/
void method() { }
See the attached screenshots of IntelliJ IDEA.
I haven't yet checked what happens in either javadoc (tool) or IntelliJ IDEA if there are more than one accessible same-named method.
I also assume there might be some clarification required for the case where a field and a method share a name and the link does not contain enough information to disambiguate them. For example,
private int hashCode;
@Override
public int hashCode() {
return super.hashCode();
}
/**
* {@link #hashCode}
*/
void method() { }
See the attached screenshots of IntelliJ IDEA.
- relates to
-
JDK-8139744 Types referred in @link/@linkplain tags are not always hyperlinks
-
- Open
-