Repository navigation
Use fancy fancy [## Javadoc links](https://docs.oracle.com/en/java/javase/26/javadoc/using-markdown-documentation-comments.html#:~:text=To%20create%20a%20link%20to%20user%2Ddefined%20and%20implicitly%20defined%20IDs%20in%20the%20generated%20documentation). - #8346
Merged
Merged
Conversation
copybara-service
Bot
force-pushed
the
test_900222431
branch
from
April 15, 2026 20:21
46c6063 to
d8487c4
Compare
…javase/26/javadoc/using-markdown-documentation-comments.html#:~:text=To%20create%20a%20link%20to%20user%2Ddefined%20and%20implicitly%20defined%20IDs%20in%20the%20generated%20documentation). Also, update a couple TODOs to point to bugs. RELNOTES=n/a PiperOrigin-RevId: 900333784
copybara-service
Bot
force-pushed
the
test_900222431
branch
from
April 15, 2026 21:04
d8487c4 to
dbb844f
Compare
cpovirk
added a commit
to jspecify/jspecify
that referenced
this pull request
Jul 15, 2026
Currently, `NonNull` links to `Nullable.html#projection`, but there is no such anchor by that name. I've added one at the definition. This is still not as clear as having a section would be, but I'm not sure whether we want a section. Another option would be to change the text in `NonNull` to refer to "nullable projection" as... ``` "when `Nullable` is [applied to](Nullable#meaning-per-each-kind-of-type-usage-heading) a type variable ``` ...or something to that effect. (For the anchor, I introduced a `span`. If I make it completely empty, then I get a warning from Javadoc. Thus, I decided to make it cover the "title" of the list item.) As for using [`##` links](https://docs.oracle.com/en/java/javase/26/docs/specs/javadoc/doc-comment-spec.html#:~:text=references%20to%20arbitrary%20URI%20fragments): That's what I had come here to do before I found the problem with `#projection`. Compare google/guava#8346. From what I've seen, their main advantage is when linking to other projects (since you can link to, say, `Character##supplementary` instead of `https://docs.oracle.com/en/java/javase/26/docs/api/java.base/java/lang/Character.html#supplementary`. But I figure we might as well use them for links inside JSpecify, too. I also raised the minimum version for which we generate Javadoc to 21. That version adds support for `##` links. It's very possible that I should have just bumped it all the way to 26: We want to use the newest version of Javadoc to build our release Javadoc, just as we already do for snapshot Javadoc. So, if we were to skip building Javadoc under earlier versions, that could act as a free check during [the release process](#305) that we're using the right version. Then we'd want to bump this version [when we bump our Java version elsewhere](#815). The downside would be that local users who build with Java 21 can no longer build Javadoc (though I'm not sure it's that hard to just [have Gradle download a newer version for them](https://github.com/jspecify/jspecify/issues/813)—and how many people really care whether they can build our Javadoc locally, especially as long as it doesn't fail in a way that breaks the whole build?). But that might become the case anyway if we [start to use Markdown Javadoc](#817), which would raise the minimum [to Java 23](https://openjdk.org/jeps/467), and maybe we'd unknowingly use a feature that requires something even newer. But since I wrote all that, we've merged #818, which makes the existing check obsolete. I will clean it up in a separate PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Use fancy fancy
##Javadoc links.Also, update a couple TODOs to point to bugs.
RELNOTES=n/a