Skip to content

Commit

Permalink
Link to Java 21 Javadoc instead of Java 7.
Browse files Browse the repository at this point in the history
I had hoped that maybe this would help with the error that I saw when building with the Javadoc from JDK 21:

```
[ERROR] error: Unexpected redirection for URL https://docs.oracle.com/javase/7/docs/api/element-list to https://docs.oracle.com/javase/7/docs/api/
```

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)](google/guava#6790 (comment)) _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](https://github.com/google/truth/releases/tag/v1.1.4). 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
PiperOrigin-RevId: 696632561
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Nov 14, 2024
1 parent 75ebb2a commit ffc21b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
<link>https://guava.dev/releases/snapshot-jre/api/docs</link>
<link>https://protobuf.dev/reference/java/api-docs/</link>
<link>https://junit.org/junit4/javadoc/latest/</link>
<link>https://docs.oracle.com/javase/7/docs/api/</link>
<link>https://docs.oracle.com/javase/21/docs/api/</link>
</links>
<sourceFileExcludes>
<sourceFileExclude>**/super/**/*.java</sourceFileExclude>
Expand Down

0 comments on commit ffc21b5

Please sign in to comment.