Prefer method.getAnnotation(…) over AnnotationUtils.findAnnotation(…).

The latter method is much much slower than the former and JpaQueryMethod.isModifyingQuery() is invoked for every query method execution.
This commit is contained in:
Oliver Gierke
2011-04-28 07:53:33 +02:00
parent 33a3c8f5ae
commit e81d480021

View File

@@ -83,7 +83,7 @@ public class JpaQueryMethod extends QueryMethod {
@Override
protected boolean isModifyingQuery() {
return null != AnnotationUtils.findAnnotation(method, Modifying.class);
return null != method.getAnnotation(Modifying.class);
}