Polishing

This commit is contained in:
Sam Brannen
2015-09-22 15:57:32 -04:00
parent 0ad59ddb7a
commit d66f85bd66
2 changed files with 48 additions and 40 deletions

View File

@@ -194,11 +194,11 @@ public class SpringCacheAnnotationParser implements CacheAnnotationParser, Seria
return new DefaultCacheConfig();
}
private <T extends Annotation> Collection<T> getAnnotations(AnnotatedElement ae, Class<T> annotationType) {
Collection<T> anns = new ArrayList<T>(2);
private <A extends Annotation> Collection<A> getAnnotations(AnnotatedElement ae, Class<A> annotationType) {
Collection<A> anns = new ArrayList<A>(2);
// look at raw annotation
T ann = ae.getAnnotation(annotationType);
A ann = ae.getAnnotation(annotationType);
if (ann != null) {
anns.add(AnnotationUtils.synthesizeAnnotation(ann, ae));
}