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

Vicente Romero vromero at openjdk.org
Thu Feb 12 02:50:08 UTC 2026


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

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

Commit messages:
 - changes to test
 - Merge branch 'master' into JDK-8368864
 - Merge branch 'master' into JDK-8368864
 - minor test change
 - minor changes
 - Merge branch 'master' into JDK-8368864
 - test change
 - 8368864: Confusing error message (or wrong error) when record component has @deprecated Javadoc tag

Changes: https://git.openjdk.org/jdk/pull/28307/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28307&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8368864
  Stats: 60 lines in 2 files changed: 60 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/28307.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28307/head:pull/28307

PR: https://git.openjdk.org/jdk/pull/28307


More information about the compiler-dev mailing list