mirror of
https://github.com/querydsl/querydsl.git
synced 2026-07-12 21:20:19 +08:00
Use the isAnnotationPresent method for annotation presence checking
This commit is contained in:
parent
c1343214fc
commit
48a88a60ac
@ -37,11 +37,8 @@ public class JPAProviderRule implements MethodRule {
|
||||
}
|
||||
|
||||
private <T extends Annotation> boolean hasAnnotation(FrameworkMethod method, Class<T> clazz) {
|
||||
T rv = method.getMethod().getAnnotation(clazz);
|
||||
if (rv == null) {
|
||||
rv = method.getMethod().getDeclaringClass().getAnnotation(clazz);
|
||||
}
|
||||
return rv != null;
|
||||
return method.getMethod().isAnnotationPresent(clazz)
|
||||
|| method.getMethod().getDeclaringClass().isAnnotationPresent(clazz);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user