Skip to content

take Lombok constructor annotations into account for @Autowired validation #1635

@martinlippert

Description

@martinlippert

The validation that checks for unnecessary @Autowired annotations on constructors should take the following Lombok annotations into account:

  • @NoArgsConstructor
  • @RequiredArgsConstructor
  • @AllArgsConstructor

In case any of these annotations is on the class, the validation SHOULD NOT complain about the @Autowired annotation on a single constructor on the class, since Lombok will add further constructors to that class at build-time - which causes the @Autowired annotation to be necessary.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions