提交 7230d6a1 编写于 作者: J Juergen Hoeller

Polishing

上级 6560aed1
......@@ -21,7 +21,6 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executor;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.annotation.BeanFactoryAnnotationUtils;
......
......@@ -76,7 +76,7 @@ public class AsyncExecutionInterceptor extends AsyncExecutionAspectSupport
/**
* Create a new {@code AsyncExecutionInterceptor}.
* @param defaultExecutor the {@link Executor} (typically a Spring {@link AsyncTaskExecutor}
* or {@link java.util.concurrent.ExecutorService}) to delegate to.
* or {@link java.util.concurrent.ExecutorService}) to delegate to
* @param exceptionHandler the {@link AsyncUncaughtExceptionHandler} to use
*/
public AsyncExecutionInterceptor(Executor defaultExecutor, AsyncUncaughtExceptionHandler exceptionHandler) {
......@@ -111,10 +111,10 @@ public class AsyncExecutionInterceptor extends AsyncExecutionAspectSupport
@Override
public Object invoke(final MethodInvocation invocation) throws Throwable {
Class<?> targetClass = (invocation.getThis() != null ? AopUtils.getTargetClass(invocation.getThis()) : null);
Method tmp = ClassUtils.getMostSpecificMethod(invocation.getMethod(), targetClass);
final Method specificMethod = BridgeMethodResolver.findBridgedMethod(tmp);
Method specificMethod = ClassUtils.getMostSpecificMethod(invocation.getMethod(), targetClass);
final Method userDeclaredMethod = BridgeMethodResolver.findBridgedMethod(specificMethod);
AsyncTaskExecutor executor = determineAsyncExecutor(specificMethod);
AsyncTaskExecutor executor = determineAsyncExecutor(userDeclaredMethod);
if (executor == null) {
throw new IllegalStateException(
"No executor specified and no default executor set on AsyncExecutionInterceptor either");
......@@ -131,7 +131,7 @@ public class AsyncExecutionInterceptor extends AsyncExecutionAspectSupport
}
}
catch (Throwable ex) {
handleError(ex, specificMethod, invocation.getArguments());
handleError(ex, userDeclaredMethod, invocation.getArguments());
}
return null;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册