From 66156cc24fb08c2ede59afc0280394b0dfa1f91c Mon Sep 17 00:00:00 2001 From: Madhura Bhave Date: Wed, 18 Jul 2018 10:29:43 -0700 Subject: [PATCH] Polish --- .../reactive/ApplicationContextServerWebExchangeMatcher.java | 3 ++- .../ApplicationContextServerWebExchangeMatcherTests.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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 9e4cca6949..6f58df0332 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,8 @@ public abstract class ApplicationContextServerWebExchangeMatcher @SuppressWarnings("unchecked") private Supplier createContext(ServerWebExchange exchange) { ApplicationContext context = exchange.getApplicationContext(); - Assert.state(context != null, "No ApplicationContext found."); + Assert.state(context != null, + "No ApplicationContext found on ServerWebExchange."); if (this.contextClass.isInstance(context)) { return () -> (C) context; } 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 7ed62f17d3..f436e86751 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 ApplicationContext found."); + this.thrown.expectMessage("No ApplicationContext found on ServerWebExchange."); new TestApplicationContextServerWebExchangeMatcher<>(ExistingBean.class) .callMatchesAndReturnProvidedContext(exchange); }