Bug 539292 - Generate hashCode and Equals does not add @Generated annotation
Summary: Generate hashCode and Equals does not add @Generated annotation
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.8   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-20 10:04 EDT by Michael Giroux CLA
Modified: 2018-09-20 10:04 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Giroux CLA 2018-09-20 10:04:42 EDT
The code generated for hashCode and equals can produce SonarQube issues.  As there is nothing that can be done for these (and all other methods generated by Eclipse such as toString, getters, setters, ...) it would be ideal if there was an option to have these methods annotated:
@Generated("Eclipse")  or @Generated("org.Eclipse").

I can add the annotation manually, but I must do that every time I regenerate these methods when the class is updated with new members.