Skip to content

Detect @deprecated in Markdown Javadoc comments in DepAnn. - #6448

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_1035333008
Dec 3, 2026
Merged

copybara-service[bot] merged 1 commit into
masterfrom
test_1035333008

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Detect @deprecated in Markdown Javadoc comments in DepAnn.

javac only sets Flags.DEPRECATED for @deprecated tags in traditional /** ... */ Javadoc comments, not Markdown (///) comments, so declarations with /// @deprecated and no @Deprecated annotation previously bypassed DepAnn.

Check @Deprecated first; when absent and Flags.DEPRECATED is unset, check attached /// comments containing @deprecated via DocCommentTree.getBlockTags() for a DocTree.Kind.DEPRECATED block tag so mentions in prose, code spans, and fenced code blocks do not trigger false positives.

`javac` only sets `Flags.DEPRECATED` for `@deprecated` tags in traditional `/** ... */` Javadoc comments, not Markdown (`///`) comments, so declarations with `/// @deprecated` and no `@Deprecated` annotation previously bypassed `DepAnn`.

Check `@Deprecated` first; when absent and `Flags.DEPRECATED` is unset, check attached `///` comments containing `@deprecated` via `DocCommentTree.getBlockTags()` for a `DocTree.Kind.DEPRECATED` block tag so mentions in prose, code spans, and fenced code blocks do not trigger false positives.

PiperOrigin-RevId: 1035397184
@copybara-service
copybara-service Bot merged commit 314aff0 into master Dec 3, 2026
1 check passed
@copybara-service
copybara-service Bot deleted the test_1035333008 branch December 3, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant