Support deprecated tag. - #2059
Conversation
gnodet
left a comment
There was a problem hiding this comment.
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
7f61b8a to
c25a40a
Compare
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.
c25a40a to
2344268
Compare
gnodet
left a comment
There was a problem hiding this comment.
Re-review (2nd pass): Four of five previously flagged issues are addressed:
- ✅
getDeprecated(Element)now checks@Deprecatedannotation when doc comment is null — fixed - ✅ Truncated comment — resolved
- ✅ Typo "deprecate" → "deprecated" — fixed
- ✅
{@link ENUM2_KEY}→{@link #ENUM2_KEY}— fixed - ⚪ Missing
enum2Key.deprecatedassertion — 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
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:
Note that commits might be squashed by a maintainer on merge.
This may not always be possible but is a best-practice.
mvn verifyto make sure basic checks pass.A more thorough check will be performed on your pull request automatically.
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.