Link to Java 21 Javadoc instead of Java 7. #1359
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Link to Java 21 Javadoc instead of Java 7.
I had hoped that maybe this would help with the error that I saw when building with the Javadoc from JDK 21:
It turns out not to help with that.
However, the change does lead us to produce actual links to JDK types in e.g., http://truth.dev/StringSubject. (This sounds like it's different from what I previously saw in Guava, where generating Javadoc with JDK 21 (while not updating the version we link to) also fixed links. I guess I should consider updating Guava to link to Java 21, too.)
Our old behavior of linking to Java 7 arguably made some sense when that was the minimum version that we supported. But we've required Java 8 for a while now. And really, some even newer version seems likely to be useful to most users, who have largely upgraded. And given that Google search is already not great at finding Javadoc at all (let alone new versions), maybe it's good for us to get into the practice of linking to newer versions to see if that helps improve their rankings??
RELNOTES=n/a