Skip to content

Commit fa371e8

Browse files
committed
Merge branch '4.0.x'
Closes gh-50845
2 parents 6719b46 + 5a8ecdf commit fa371e8

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

core/spring-boot-test/src/main/java/org/springframework/boot/test/context/assertj/ApplicationContextAssert.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public <T> AbstractObjectArrayAssert<?, String> getBeanNames(Class<T> type) {
251251
* given type
252252
*/
253253
@CheckReturnValue
254-
public <T> AbstractObjectAssert<?, T> getBean(Class<T> type) {
254+
public <T> AbstractObjectAssert<?, @Nullable T> getBean(Class<T> type) {
255255
return getBean(type, Scope.INCLUDE_ANCESTORS);
256256
}
257257

@@ -273,7 +273,7 @@ public <T> AbstractObjectAssert<?, T> getBean(Class<T> type) {
273273
* given type
274274
*/
275275
@CheckReturnValue
276-
public <T> AbstractObjectAssert<?, T> getBean(Class<T> type, Scope scope) {
276+
public <T> AbstractObjectAssert<?, @Nullable T> getBean(Class<T> type, Scope scope) {
277277
Assert.notNull(scope, "'scope' must not be null");
278278
if (this.startupFailure != null) {
279279
throwAssertionError(
@@ -334,7 +334,7 @@ private boolean isPrimary(String name, Scope scope) {
334334
* @throws AssertionError if the application context did not start
335335
*/
336336
@CheckReturnValue
337-
public AbstractObjectAssert<?, Object> getBean(String name) {
337+
public AbstractObjectAssert<?, @Nullable Object> getBean(String name) {
338338
if (this.startupFailure != null) {
339339
throwAssertionError(
340340
contextFailedToStartWhenExpecting(this.startupFailure, "to contain a bean of name:%n <%s>", name));
@@ -362,7 +362,7 @@ public AbstractObjectAssert<?, Object> getBean(String name) {
362362
*/
363363
@SuppressWarnings("unchecked")
364364
@CheckReturnValue
365-
public <T> AbstractObjectAssert<?, T> getBean(String name, Class<T> type) {
365+
public <T> AbstractObjectAssert<?, @Nullable T> getBean(String name, Class<T> type) {
366366
if (this.startupFailure != null) {
367367
throwAssertionError(contextFailedToStartWhenExpecting(this.startupFailure,
368368
"to contain a bean of name:%n <%s> (%s)", name, type));

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ kotlinVersion=2.3.21
1919
mavenVersion=3.9.13
2020
mockitoVersion=5.23.0
2121
nativeBuildToolsVersion=1.1.1
22-
nullabilityPluginVersion=0.0.11
22+
nullabilityPluginVersion=0.0.14
2323
snakeYamlVersion=2.6
2424
springGrpcVersion=1.1.0
2525
springFrameworkVersion=7.0.8

0 commit comments

Comments
 (0)