From 132805133ded4737d2a69dbcd1f81852934884d5 Mon Sep 17 00:00:00 2001 From: lixiaolong11000 Date: Tue, 7 Jan 2020 18:03:11 +0800 Subject: [PATCH] Improve ExposeInvocationInterceptor exception message Closes gh-24293 --- .../aop/interceptor/ExposeInvocationInterceptor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java index 3b3f62fa7cc5..52142fd99169 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java @@ -73,7 +73,9 @@ public static MethodInvocation currentInvocation() throws IllegalStateException throw new IllegalStateException( "No MethodInvocation found: Check that an AOP invocation is in progress, and that the " + "ExposeInvocationInterceptor is upfront in the interceptor chain. Specifically, note that " + - "advices with order HIGHEST_PRECEDENCE will execute before ExposeInvocationInterceptor!"); + "advices with order HIGHEST_PRECEDENCE will execute before ExposeInvocationInterceptor! " + + "Check that ExposeInvocationInterceptor and ExposeInvocationInterceptor.currentInvocation() " + + "invoke in one Thread"); } return mi; }