Skip to content

Support deprecated tag. - #2059

Merged
kwin merged 1 commit into
masterfrom
feature/deprecated-tag-support
Aug 18, 2026
Merged

kwin merged 1 commit into
masterfrom
feature/deprecated-tag-support

Conversation

@kwin

@kwin kwin commented Aug 17, 2026

Copy link
Copy Markdown
Member

Emit similar to regular javadoc as description prefix with bold text "Deprecated." followed by italic deprecated reason. Deprecated annotation/tag is considered in enclosing elements as well.

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Your pull request should address just one issue, without pulling in other changes.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body.
    Note that commits might be squashed by a maintainer on merge.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
    This may not always be possible but is a best-practice.
  • Run mvn verify to make sure basic checks pass.
    A more thorough check will be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its verify).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@kwin
kwin requested a review from cstamas August 17, 2026 16:26

@gnodet gnodet left a comment

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.

Nice addition of @deprecated tag support — the approach of recursing up the element hierarchy to inherit deprecation status is sound. A few items to consider below, the most notable being a gap in getDeprecated(Element) when an enclosing element has @Deprecated but no Javadoc comment.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of Guillaume Nodet

@kwin
kwin force-pushed the feature/deprecated-tag-support branch from 7f61b8a to c25a40a Compare August 17, 2026 18:54
@kwin
kwin requested a review from gnodet August 17, 2026 18:55
Emit similar to regular javadoc as description prefix with bold text
"Deprecated." followed by italic deprecated reason.
Deprecated annotation/tag is considered in enclosing elements as well.
@kwin
kwin force-pushed the feature/deprecated-tag-support branch from c25a40a to 2344268 Compare August 17, 2026 19:01

@gnodet gnodet left a comment

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.

Re-review (2nd pass): Four of five previously flagged issues are addressed:

  1. ✅ getDeprecated(Element) now checks @Deprecated annotation when doc comment is null — fixed
  2. ✅ Truncated comment — resolved
  3. ✅ Typo "deprecate" → "deprecated" — fixed
  4. ✅ {@link ENUM2_KEY} → {@link #ENUM2_KEY} — fixed
  5. ⚪ Missing enum2Key.deprecated assertion — non-blocking, would be nice for symmetry

The @Deprecated annotation fix is clean — correctly returns Optional.of("") when the annotation is present on an element without Javadoc, and falls through to the enclosing element otherwise. CI passes across all matrix combinations.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of Guillaume Nodet

@kwin kwin added the documentation Improvements or additions to documentation label Aug 18, 2026
@kwin
kwin merged commit f434087 into master Aug 18, 2026
24 checks passed
@kwin
kwin deleted the feature/deprecated-tag-support branch August 18, 2026 13:07
@github-actions github-actions Bot added this to the 2.0.22 milestone Aug 18, 2026
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.

2 participants