File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
core/spring-boot/src/main/java/org/springframework/boot Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ public interface ApplicationContextFactory {
7676 * @param webApplicationType the web application type
7777 * @return the newly created application context
7878 */
79- ConfigurableApplicationContext create (@ Nullable WebApplicationType webApplicationType );
79+ @ Nullable ConfigurableApplicationContext create (@ Nullable WebApplicationType webApplicationType );
8080
8181 /**
8282 * Creates an {@code ApplicationContextFactory} that will create contexts by
Original file line number Diff line number Diff line change @@ -569,7 +569,10 @@ protected void bindToSpringApplication(ConfigurableEnvironment environment) {
569569 * @see #setApplicationContextFactory(ApplicationContextFactory)
570570 */
571571 protected ConfigurableApplicationContext createApplicationContext () {
572- return this .applicationContextFactory .create (this .properties .getWebApplicationType ());
572+ ConfigurableApplicationContext context = this .applicationContextFactory
573+ .create (this .properties .getWebApplicationType ());
574+ Assert .state (context != null , "ApplicationContextFactory created null context" );
575+ return context ;
573576 }
574577
575578 /**
You can’t perform that action at this time.
0 commit comments