Skip to content

Commit 04a7f08

Browse files
committed
SpringCacheAnnotationParser.parseCacheAnnotations cannot be protected
Its parameter DefaultCacheConfig is just package-visible...
1 parent 999c780 commit 04a7f08

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

spring-context/src/main/java/org/springframework/cache/annotation/SpringCacheAnnotationParser.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -62,7 +62,7 @@ public Collection<CacheOperation> parseCacheAnnotations(Method method) {
6262
}
6363

6464
@Nullable
65-
protected Collection<CacheOperation> parseCacheAnnotations(DefaultCacheConfig cachingConfig, AnnotatedElement ae) {
65+
private Collection<CacheOperation> parseCacheAnnotations(DefaultCacheConfig cachingConfig, AnnotatedElement ae) {
6666
Collection<CacheOperation> ops = parseCacheAnnotations(cachingConfig, ae, false);
6767
if (ops != null && ops.size() > 1 && ae.getAnnotations().length > 0) {
6868
// More than one operation found -> local declarations override interface-declared ones...
@@ -88,6 +88,7 @@ private Collection<CacheOperation> parseCacheAnnotations(
8888
ops.add(parseCacheableAnnotation(ae, cachingConfig, cacheable));
8989
}
9090
}
91+
9192
Collection<CacheEvict> evicts = (localOnly ? AnnotatedElementUtils.getAllMergedAnnotations(ae, CacheEvict.class) :
9293
AnnotatedElementUtils.findAllMergedAnnotations(ae, CacheEvict.class));
9394
if (!evicts.isEmpty()) {
@@ -96,6 +97,7 @@ private Collection<CacheOperation> parseCacheAnnotations(
9697
ops.add(parseEvictAnnotation(ae, cachingConfig, evict));
9798
}
9899
}
100+
99101
Collection<CachePut> puts = (localOnly ? AnnotatedElementUtils.getAllMergedAnnotations(ae, CachePut.class) :
100102
AnnotatedElementUtils.findAllMergedAnnotations(ae, CachePut.class));
101103
if (!puts.isEmpty()) {
@@ -104,6 +106,7 @@ private Collection<CacheOperation> parseCacheAnnotations(
104106
ops.add(parsePutAnnotation(ae, cachingConfig, put));
105107
}
106108
}
109+
107110
Collection<Caching> cachings = (localOnly ? AnnotatedElementUtils.getAllMergedAnnotations(ae, Caching.class) :
108111
AnnotatedElementUtils.findAllMergedAnnotations(ae, Caching.class));
109112
if (!cachings.isEmpty()) {
@@ -313,7 +316,6 @@ else if (StringUtils.hasText(this.cacheManager)) {
313316
builder.setCacheManager(this.cacheManager);
314317
}
315318
}
316-
317319
}
318320

319321
}

0 commit comments

Comments
 (0)