Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
Issue: SPR-10807
  • Loading branch information
jhoeller committed Aug 6, 2013
1 parent 9645799 commit ce06d13
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,8 @@ public KeyGenerator getKeyGenerator() {

public void afterPropertiesSet() {
Assert.state(this.cacheManager != null, "'cacheManager' is required");
Assert.state(this.cacheOperationSource != null, "The 'cacheOperationSources' "
+ "property is required: If there are no cacheable methods, "
+ "then don't use a cache aspect.");
Assert.state(this.cacheOperationSource != null, "The 'cacheOperationSources' property is required: " +
"If there are no cacheable methods, then don't use a cache aspect.");
this.initialized = true;
}

Expand All @@ -155,7 +154,7 @@ protected Collection<Cache> getCaches(CacheOperation operation) {
Collection<Cache> caches = new ArrayList<Cache>(cacheNames.size());
for (String cacheName : cacheNames) {
Cache cache = this.cacheManager.getCache(cacheName);
Assert.notNull(cache, "Cannot find cache named [" + cacheName + "] for " + operation);
Assert.notNull(cache, "Cannot find cache named '" + cacheName + "' for " + operation);
caches.add(cache);
}
return caches;
Expand Down Expand Up @@ -249,8 +248,7 @@ private void performCacheEvict(CacheOperationContext context, CacheEvictOperatio
}
}

private void logInvalidating(CacheOperationContext context,
CacheEvictOperation operation, Object key) {
private void logInvalidating(CacheOperationContext context, CacheEvictOperation operation, Object key) {
if (this.logger.isTraceEnabled()) {
this.logger.trace("Invalidating " + (key == null ? "entire cache" : "cache key " + key) +
" for operation " + operation + " on method " + context.method);
Expand Down Expand Up @@ -326,8 +324,7 @@ public CacheOperationContexts(Collection<? extends CacheOperation> operations,
Method method, Object[] args, Object target, Class<?> targetClass) {

for (CacheOperation operation : operations) {
this.contexts.add(operation.getClass(), new CacheOperationContext(operation,
method, args, target, targetClass));
this.contexts.add(operation.getClass(), new CacheOperationContext(operation, method, args, target, targetClass));
}
}

Expand Down

0 comments on commit ce06d13

Please sign in to comment.