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

Vicente Romero vromero at openjdk.org
Thu Feb 26 14:28:10 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

Vicente Romero has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains nine commits:

 - Merge master
 - 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=01
  Stats: 58 lines in 2 files changed: 58 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