diff --git a/src/main/java/org/springframework/data/repository/augment/AnnotationBasedQueryAugmentor.java b/src/main/java/org/springframework/data/repository/augment/AnnotationBasedQueryAugmentor.java index 60d3143f0..9ec1498ac 100644 --- a/src/main/java/org/springframework/data/repository/augment/AnnotationBasedQueryAugmentor.java +++ b/src/main/java/org/springframework/data/repository/augment/AnnotationBasedQueryAugmentor.java @@ -103,11 +103,11 @@ public abstract class AnnotationBasedQueryAugmentor type, Method method) { - T expression = AnnotationUtils.findAnnotation(type, annotationType); + T annotation = AnnotationUtils.findAnnotation(type, annotationType); - if (expression != null) { - cache.put(method, expression); - return expression; + if (annotation != null) { + cache.put(method, annotation); + return annotation; } return null; @@ -118,7 +118,15 @@ public abstract class AnnotationBasedQueryAugmentor