-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Open
Milestone
@scordio
Description
I suggest to decorate ApplicationContextAssert::getBean(s)
methods with a @CheckReturnValue
annotation so that incomplete statements like the following are spotted by static analysis tools like SpotBugs and IntelliJ IDEA:
assertThat(context).getBean(MyService.class);
To achieve this, no additional dependency is needed and Spring Boot Test can declare its own @CheckReturnValue
annotation, similarly to what AssertJ and Mockito do.
I can raise a PR with the changes if the idea is accepted.