Consistent use of AnnotatedElementUtils.findMergedAnnotation/hasAnnotation

Issue: SPR-13440
This commit is contained in:
Juergen Hoeller
2016-03-23 18:39:20 +01:00
parent 311d4c95a3
commit 5025c615b1
33 changed files with 357 additions and 238 deletions

View File

@@ -19,7 +19,7 @@ package org.springframework.scheduling.aspectj;
import java.lang.reflect.Method;
import java.util.concurrent.Future;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.core.annotation.AnnotatedElementUtils;
import org.springframework.scheduling.annotation.Async;
/**
@@ -68,9 +68,9 @@ public aspect AnnotationAsyncExecutionAspect extends AbstractAsyncExecutionAspec
protected String getExecutorQualifier(Method method) {
// Maintainer's note: changes made here should also be made in
// AnnotationAsyncExecutionInterceptor#getExecutorQualifier
Async async = AnnotationUtils.findAnnotation(method, Async.class);
Async async = AnnotatedElementUtils.findMergedAnnotation(method, Async.class);
if (async == null) {
async = AnnotationUtils.findAnnotation(method.getDeclaringClass(), Async.class);
async = AnnotatedElementUtils.findMergedAnnotation(method.getDeclaringClass(), Async.class);
}
return (async != null ? async.value() : null);
}