From 9bd723ddada4f8f730c1b41b7fdf4a0a29da15e8 Mon Sep 17 00:00:00 2001 From: Madhura Bhave Date: Tue, 17 Jul 2018 17:05:29 -0700 Subject: [PATCH 1/2] Fix exception message Fixes gh-13783 --- .../reactive/ApplicationContextServerWebExchangeMatcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcher.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcher.java index f809689fabd..9e4cca6949c 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcher.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcher.java @@ -88,7 +88,7 @@ public abstract class ApplicationContextServerWebExchangeMatcher @SuppressWarnings("unchecked") private Supplier createContext(ServerWebExchange exchange) { ApplicationContext context = exchange.getApplicationContext(); - Assert.state(context != null, "No WebApplicationContext found."); + Assert.state(context != null, "No ApplicationContext found."); if (this.contextClass.isInstance(context)) { return () -> (C) context; } From e907ae605d2af61d8a5bca545c7e81441b68228e Mon Sep 17 00:00:00 2001 From: Madhura Bhave Date: Tue, 17 Jul 2018 17:08:53 -0700 Subject: [PATCH 2/2] Fix tests See gh-13783 --- .../ApplicationContextServerWebExchangeMatcherTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcherTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcherTests.java index bbb39a57d1c..7ed62f17d3f 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcherTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcherTests.java @@ -91,7 +91,7 @@ public class ApplicationContextServerWebExchangeMatcherTests { MockServerWebExchange exchange = MockServerWebExchange .from(MockServerHttpRequest.get("/path").build()); this.thrown.expect(IllegalStateException.class); - this.thrown.expectMessage("No WebApplicationContext found."); + this.thrown.expectMessage("No ApplicationContext found."); new TestApplicationContextServerWebExchangeMatcher<>(ExistingBean.class) .callMatchesAndReturnProvidedContext(exchange); }