From 2ce974c7b1bea0f0fcc8dbb68c6a98cdf44a5b48 Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Fri, 1 Aug 2025 13:36:25 +0200 Subject: [PATCH] Add more nullability annotations to module/spring-boot-actuator-autoconfigure See gh-46587 --- .../autoconfigure/web/server/ManagementContextFactory.java | 1 + 1 file changed, 1 insertion(+) diff --git a/module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementContextFactory.java b/module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementContextFactory.java index dec175f9ec8..7345532d606 100644 --- a/module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementContextFactory.java +++ b/module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementContextFactory.java @@ -67,6 +67,7 @@ public final class ManagementContextFactory { } ConfigurableApplicationContext managementContext = ApplicationContextFactory.DEFAULT .create(this.webApplicationType); + Assert.state(managementContext != null, "'managementContext' must not be null"); managementContext.setEnvironment(childEnvironment); managementContext.setParent(parentContext); return managementContext;