From 57cb1f2777be4b5281c24bdd28a83ba30ca5994f Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 21 Jul 2011 07:38:08 +0000 Subject: [PATCH] improved ExposeInvocationInterceptor error message with respect to advice ordering (SPR-8544) --- .../aop/interceptor/ExposeInvocationInterceptor.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/org.springframework.aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java b/org.springframework.aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java index 35970088048..86ac2027569 100644 --- a/org.springframework.aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java +++ b/org.springframework.aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -70,8 +70,9 @@ public class ExposeInvocationInterceptor implements MethodInterceptor, Ordered, MethodInvocation mi = invocation.get(); if (mi == null) throw new IllegalStateException( - "No MethodInvocation found: Check that an AOP invocation is in progress, " + - "and that the ExposeInvocationInterceptor is in the interceptor chain."); + "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!"); return mi; }