Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add @Generated on generated code #453

Closed
regisd opened this issue Oct 15, 2018 · 3 comments
Closed

Add @Generated on generated code #453

regisd opened this issue Oct 15, 2018 · 3 comments
Assignees
Labels
enhancement Feature requests
Milestone

Comments

@regisd
Copy link
Member

regisd commented Oct 15, 2018

In order to work around the error-prone fall-though violations in the generated code (#222), I tried using using -XepDisableWarningsInGeneratedCode.

Unfortunately this javac option only works if the generated code is annotated with @Generated.

@regisd regisd added this to the 1.7.1 milestone Oct 15, 2018
@regisd regisd self-assigned this Oct 15, 2018
@regisd regisd added the enhancement Feature requests label Oct 15, 2018
@regisd regisd assigned lsf37 and unassigned regisd Oct 18, 2018
@regisd regisd modified the milestones: 1.7.1, 1.8.0 Oct 18, 2018
@regisd
Copy link
Member Author

regisd commented Oct 18, 2018

Adding this annotation will create a dependency on 'javax.annotation:javax.annotation-api:jar'
The current workaround which is with @SuppressWarnings #454 should be sufficient for now.
I'll defer the decision about adding a dep on this annotation to 1.8 and let Gerwin make the call.

@regisd regisd removed this from the 1.8.0 milestone Nov 27, 2019
@regisd
Copy link
Member Author

regisd commented Mar 28, 2020

@lsf37 So actually, there is a problem using @SuppressWarnings on the class: There can be only one such annotation, which can be problematic if the custom header wants to define one.

@lsf37
Copy link
Member

lsf37 commented Jan 7, 2023

There is now a mechanism for leaving out the default SuppressWarnings annotation, so I think we can close this one.

@lsf37 lsf37 closed this as completed Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants