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

AvoidUsingObjectMapperAsALocalVariable should consider @PostConstruct annotation #81

Closed
dgroup opened this issue Feb 8, 2022 · 0 comments · Fixed by #83
Closed

AvoidUsingObjectMapperAsALocalVariable should consider @PostConstruct annotation #81

dgroup opened this issue Feb 8, 2022 · 0 comments · Fixed by #83
Assignees
Milestone

Comments

@dgroup
Copy link
Owner

dgroup commented Feb 8, 2022

The rule should not give violation when the field was initiated in the method marked by @PostConstruct annotation

public class X {
  private ObjectMapper mapper;

  @PostConstruct
  public void init() {
      mapper = new ObjectMapper();
  }
  ...
}
@dgroup dgroup added this to the 0.1.0 milestone Feb 8, 2022
smithros added a commit to smithros/arch4u-pmd that referenced this issue Feb 8, 2022
@dgroup dgroup linked a pull request Feb 8, 2022 that will close this issue
@rultor rultor closed this as completed in #83 Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants