SpringCacheAnnotationParser properly accepts empty @Caching annotation

Issue: SPR-14162
This commit is contained in:
Juergen Hoeller
2016-04-12 23:19:51 +02:00
parent 836a321ab2
commit da112611a5
2 changed files with 37 additions and 7 deletions

View File

@@ -87,7 +87,10 @@ public class SpringCacheAnnotationParser implements CacheAnnotationParser, Seria
if (!cachings.isEmpty()) {
ops = lazyInit(ops);
for (Caching caching : cachings) {
ops.addAll(parseCachingAnnotation(ae, cachingConfig, caching));
Collection<CacheOperation> cachingOps = parseCachingAnnotation(ae, cachingConfig, caching);
if (cachingOps != null) {
ops.addAll(cachingOps);
}
}
}