Skip to content

Validate that private JUnit Jupiter lifecycle methods are not annotated with @Autowired  #32627

@sbrannen

Description

@sbrannen

Overview

In #25966, we introduced support to validate that JUnit Jupiter test methods and lifecycle methods are not annotated with @Autowired, and we explicitly filtered out private methods since JUnit Jupiter has always claimed that private test and lifecycle methods are not supported.

However, by accident, private lifecycle methods are actually supported even if discouraged.

In light of that, we should update our validation check to include private methods as well.

Related Issues

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions