RFR: 8368864: Confusing error message (or wrong error) when record component has @deprecated Javadoc tag

Jan Lahoda jlahoda at openjdk.org
Tue Feb 24 18:40:37 UTC 2026


On Thu, 13 Nov 2025 20:45:03 GMT, Vicente Romero <vromero at openjdk.org> wrote:

> The spec for records allows for the propagation of annotations and type annotations. There is a special javadoc tag `@deprecated` that when applied to most program elements its equivalent to the `@Deprecated` annotation. 
> 
> But in the case of record components, javadoc is ignoring any comments applied to them. They are not propagated anywhere, so it would be weird to act on a javadoc tag that is not even visible in the generated javadoc documentation. So we decided to just ignore the `@deprecated` javadoc tag if present.
> 
> TIA

Makes sense to me.

-------------

Marked as reviewed by jlahoda (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28307#pullrequestreview-3849849633


More information about the compiler-dev mailing list