Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Javadoc links to JSR 305 annotations #27904

Closed
ullenboom opened this issue Jan 7, 2022 · 2 comments
Closed

Fix Javadoc links to JSR 305 annotations #27904

ullenboom opened this issue Jan 7, 2022 · 2 comments
Assignees
Labels
type: documentation A documentation task
Milestone

Comments

@ullenboom
Copy link

ullenboom commented Jan 7, 2022

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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jan 7, 2022
@sbrannen sbrannen added type: documentation A documentation task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jan 14, 2022
@sbrannen sbrannen changed the title API link error: javax.annotation.*null* is not part of Java SE 8 Fix Javadoc links to JSR 305 annotations Jan 14, 2022
@sbrannen sbrannen self-assigned this Jan 14, 2022
@sbrannen
Copy link
Member

sbrannen commented Jan 14, 2022

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.

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

@sbrannen sbrannen added this to the 5.3.16 milestone Jan 17, 2022
@sbrannen
Copy link
Member

In a681d6a, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

3 participants