Polishing

This commit is contained in:
Juergen Hoeller
2018-08-13 14:23:41 +02:00
parent 5bd5df3ec4
commit 484a2f3f2d
12 changed files with 79 additions and 99 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -58,7 +58,7 @@ public class SpringCacheAnnotationParser implements CacheAnnotationParser, Seria
return parseCacheAnnotations(defaultConfig, method);
}
protected Collection<CacheOperation> parseCacheAnnotations(DefaultCacheConfig cachingConfig, AnnotatedElement ae) {
private Collection<CacheOperation> parseCacheAnnotations(DefaultCacheConfig cachingConfig, AnnotatedElement ae) {
Collection<CacheOperation> ops = null;
Collection<Cacheable> cacheables = AnnotatedElementUtils.getAllMergedAnnotations(ae, Cacheable.class);
@@ -68,6 +68,7 @@ public class SpringCacheAnnotationParser implements CacheAnnotationParser, Seria
ops.add(parseCacheableAnnotation(ae, cachingConfig, cacheable));
}
}
Collection<CacheEvict> evicts = AnnotatedElementUtils.getAllMergedAnnotations(ae, CacheEvict.class);
if (!evicts.isEmpty()) {
ops = lazyInit(ops);
@@ -75,6 +76,7 @@ public class SpringCacheAnnotationParser implements CacheAnnotationParser, Seria
ops.add(parseEvictAnnotation(ae, cachingConfig, evict));
}
}
Collection<CachePut> puts = AnnotatedElementUtils.getAllMergedAnnotations(ae, CachePut.class);
if (!puts.isEmpty()) {
ops = lazyInit(ops);
@@ -82,6 +84,7 @@ public class SpringCacheAnnotationParser implements CacheAnnotationParser, Seria
ops.add(parsePutAnnotation(ae, cachingConfig, put));
}
}
Collection<Caching> cachings = AnnotatedElementUtils.getAllMergedAnnotations(ae, Caching.class);
if (!cachings.isEmpty()) {
ops = lazyInit(ops);
@@ -283,7 +286,6 @@ public class SpringCacheAnnotationParser implements CacheAnnotationParser, Seria
builder.setCacheManager(this.cacheManager);
}
}
}
}