Take a look at https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/lang/NonNull.html:
@Target(value={METHOD,PARAMETER,FIELD})
@Retention(value=RUNTIME)
@Documented
@Nonnull
@TypeQualifierNickname
public @interface NonNull
The link behind Nonnull
points to https://docs.oracle.com/javase/8/docs/api/javax/annotation/Nonnull.html?is-external=true, which is wrong
Nonnull
is a JSR-305 datatype.
Comment From: sbrannen
I attempted to address this by adding an explicit external Javadoc link URL to our Gradle build script for http://static.javadoc.io/com.google.code.findbugs/jsr305/3.0.2/, but that doesn't seem to help.
I assume that's because that site and the Java 8 Javadoc site both contain javax.annotation
in their package-list
files.
- https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.2/package-list
- https://docs.oracle.com/javase/8/docs/api/package-list
I am not sure if the javadoc
tool supports split packages across multiple external Javadoc sites, so there might not be a way to address this issue.
Related thread on Twitter: https://twitter.com/sam_brannen/status/1482051231006789637
Comment From: sbrannen
In a681d6af229146c73e4175b6c58292d677e8bc27, I did the best that we can do to support Javadoc links to JSR 305 types; however, we cannot support @NonNull
and other types in the javax.annotation
(or jakarta.annotation
) package due to the split package. See the commit message for details.