Skip to content

More javadoc links - #1647

Merged
otaviojava merged 3 commits into
jakartaee:mainfrom
njr-11:more-javadoc-links
Nov 24, 2026
Merged

otaviojava merged 3 commits into
jakartaee:mainfrom
njr-11:more-javadoc-links

Conversation

@njr-11

@njr-11 njr-11 commented Nov 23, 2026

Copy link
Copy Markdown
Member

I noticed some more places where we have {@code } in Javadoc that can be switched to {@link }, and then AI found some more.

@njr-11 njr-11 added this to the 1.1 milestone Nov 23, 2026
@njr-11 njr-11 added the documentation Improvements or additions to documentation label Nov 23, 2026
Comment on lines +26 to +29
import java.math.BigInteger;
import java.time.Instant;
import java.time.LocalDate;
import java.util.UUID;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we had decided not to import things just for the sake of Javadoc.

I don't care much, just mentioning it in case this was unintentional.

*
* <p>Updates are performed by matching the unique identifier of the entity.
* If the entity is versioned, for example, with
* {@link Version jakarta.persistence.Version}, the version is also checked

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit weird.

* <li>{@link NumericAttribute} for entity attributes that represent numeric
* values, such as {@code long}, {@link Float}, and
* {@link java.math.BigInteger}.</li>
* {@link BigInteger}.</li>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@njr-11 was that intentional?
Because, we created a previous PR to remove it.

I'm just concerned about having multiple PRs do and undo things.

@njr-11

njr-11 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member Author

I thought we had decided not to import things just for the sake of Javadoc.

I don't care much, just mentioning it in case this was unintentional.

was that intentional? Because, we created a previous PR to remove it.

I'm just concerned about having multiple PRs do and undo things.

Good question. We certainly care about avoiding imports that cause unnecessary dependencies on other Jakarta components at run time, and we avoid that by using requires static in the module to limit the dependency to compile time. I don't have any recollection at all of whether we have a style preference for Javadoc imports vs fully qualified class names in this project. That's a good topic to ask the AI about, since I don't care to spend the time researching it myself. Here is the answer from the AI:

  1. There is no recorded decision or policy forbidding imports for Javadoc links.
  2. The Checkstyle configuration actively supports Javadoc-only imports.
  3. Precedent is mixed: module-info.java and several annotations rely heavily on imports for Javadoc links, while metamodel attribute classes and repository annotations historically used fully qualified {@link ...} expressions for standard library types (java.time.*, java.math.*) and external spec types (jakarta.persistence.*).
image

Given that, I would say this PR can leave them in the imports because the precedent is mixed and already leans in the direction of including imports.

@otaviojava
otaviojava merged commit 465ee96 into jakartaee:main Nov 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants