diff --git a/core/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/lifecycle/TestcontainersLifecycleOrderWithScopeIntegrationTests.java b/core/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/lifecycle/TestcontainersLifecycleOrderWithScopeIntegrationTests.java index bb42ef6bf23..b826e2f2be9 100644 --- a/core/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/lifecycle/TestcontainersLifecycleOrderWithScopeIntegrationTests.java +++ b/core/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/lifecycle/TestcontainersLifecycleOrderWithScopeIntegrationTests.java @@ -164,7 +164,7 @@ class TestcontainersLifecycleOrderWithScopeIntegrationTests { } @Override - public Object remove(String name) { + public @Nullable Object remove(String name) { synchronized (this) { Object removed = this.instances.remove(name); List destructor = this.destructors.get(name); diff --git a/module/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/RestartScopeInitializer.java b/module/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/RestartScopeInitializer.java index f03bbc4b598..8fc700b32da 100644 --- a/module/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/RestartScopeInitializer.java +++ b/module/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/RestartScopeInitializer.java @@ -47,7 +47,7 @@ public class RestartScopeInitializer implements ApplicationContextInitializer