New check request: Annotation conflicts between record component and explicit accessor method
- Dominant language
- Java
- Stars
- 7.2k
- Forks
- 820
- Avg merge
- 5h 9m
- Merged PRs (30d)
- 50
Description
(I know some things I'm filing might be low-value to actually implement; but it's not for me to know which ones those are :-))
If a record component declaration includes any `@Target(METHOD)` annotations, and an explicit accessor method is provided, and that explicit accessor method does not repeat the same set of method-annotations, this is fishy at best. The decision to write the accessor method explicitly has "subtracted" annotations that would otherwise have been there.
Probably either:
* the explicit method declaration should repeat the same annotations, or
* for annotations that *don't* also include `Target(RECORD_COMPONENT)`, then being listed on the record component at all is suspect
Contributor guide
Assessment
This issue has not been assessed yet.