From cd903e26dee8a623faa867f699db052e750611b8 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 22 Jan 2016 04:34:46 +0100 Subject: [PATCH] Polish --- .../concurrent/ConcurrentMapCacheManager.java | 4 ++-- .../cache/config/CacheAdviceParser.java | 18 +++++++++--------- .../cache/interceptor/CacheOperation.java | 4 ++-- .../interceptor/CacheOperationInvoker.java | 4 ++-- .../cache/interceptor/CachePutOperation.java | 4 ++-- .../cache/interceptor/CacheableOperation.java | 6 +++--- .../cache/interceptor/NamedCacheResolver.java | 4 ++-- .../cache/interceptor/SimpleKey.java | 4 ++-- .../VariableNotAvailableException.java | 4 ++-- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCacheManager.java b/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCacheManager.java index 9a9f15f8dbd..b4584f5ed19 100644 --- a/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCacheManager.java +++ b/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCacheManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 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. @@ -179,7 +179,7 @@ public class ConcurrentMapCacheManager implements CacheManager, BeanClassLoaderA */ protected Cache createConcurrentMapCache(String name) { SerializationDelegate actualSerialization = - this.storeByValue ? serialization : null; + this.storeByValue ? this.serialization : null; return new ConcurrentMapCache(name, new ConcurrentHashMap(256), isAllowNullValues(), actualSerialization); diff --git a/spring-context/src/main/java/org/springframework/cache/config/CacheAdviceParser.java b/spring-context/src/main/java/org/springframework/cache/config/CacheAdviceParser.java index f9ec32f474a..d66c6dbff5a 100644 --- a/spring-context/src/main/java/org/springframework/cache/config/CacheAdviceParser.java +++ b/spring-context/src/main/java/org/springframework/cache/config/CacheAdviceParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 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. @@ -197,14 +197,14 @@ class CacheAdviceParser extends AbstractSingleBeanDefinitionParser { Props(Element root) { String defaultCache = root.getAttribute("cache"); - key = root.getAttribute("key"); - keyGenerator = root.getAttribute("key-generator"); - cacheManager = root.getAttribute("cache-manager"); - condition = root.getAttribute("condition"); - method = root.getAttribute(METHOD_ATTRIBUTE); + this.key = root.getAttribute("key"); + this.keyGenerator = root.getAttribute("key-generator"); + this.cacheManager = root.getAttribute("cache-manager"); + this.condition = root.getAttribute("condition"); + this.method = root.getAttribute(METHOD_ATTRIBUTE); if (StringUtils.hasText(defaultCache)) { - caches = StringUtils.commaDelimitedListToStringArray(defaultCache.trim()); + this.caches = StringUtils.commaDelimitedListToStringArray(defaultCache.trim()); } } @@ -212,12 +212,12 @@ class CacheAdviceParser extends AbstractSingleBeanDefinitionParser { String cache = element.getAttribute("cache"); // sanity check - String[] localCaches = caches; + String[] localCaches = this.caches; if (StringUtils.hasText(cache)) { localCaches = StringUtils.commaDelimitedListToStringArray(cache.trim()); } else { - if (caches == null) { + if (this.caches == null) { readerCtx.error("No cache specified specified for " + element.getNodeName(), element); } } diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperation.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperation.java index 6264a0402e9..3ae277a5838 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperation.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperation.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2016 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. @@ -101,7 +101,7 @@ public abstract class CacheOperation implements BasicOperation { } public void setCacheResolver(String cacheResolver) { - Assert.notNull(cacheManager); + Assert.notNull(this.cacheManager); this.cacheResolver = cacheResolver; } diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationInvoker.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationInvoker.java index a7d956d58f2..eaa2706d0d5 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationInvoker.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationInvoker.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 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. @@ -52,7 +52,7 @@ public interface CacheOperationInvoker { } public Throwable getOriginal() { - return original; + return this.original; } } diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CachePutOperation.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CachePutOperation.java index e6a61b0adfb..58446d45c1d 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CachePutOperation.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CachePutOperation.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2016 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. @@ -29,7 +29,7 @@ public class CachePutOperation extends CacheOperation { public String getUnless() { - return unless; + return this.unless; } public void setUnless(String unless) { diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheableOperation.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheableOperation.java index ec2d0a3f347..23e8d9ff11b 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheableOperation.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheableOperation.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 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. @@ -31,7 +31,7 @@ public class CacheableOperation extends CacheOperation { public String getUnless() { - return unless; + return this.unless; } public void setUnless(String unless) { @@ -39,7 +39,7 @@ public class CacheableOperation extends CacheOperation { } public boolean isSync() { - return sync; + return this.sync; } public void setSync(boolean sync) { diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/NamedCacheResolver.java b/spring-context/src/main/java/org/springframework/cache/interceptor/NamedCacheResolver.java index 51e95c15330..f75fd2e8c16 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/NamedCacheResolver.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/NamedCacheResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2016 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. @@ -51,7 +51,7 @@ public class NamedCacheResolver extends AbstractCacheResolver { @Override protected Collection getCacheNames(CacheOperationInvocationContext context) { - return cacheNames; + return this.cacheNames; } } diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/SimpleKey.java b/spring-context/src/main/java/org/springframework/cache/interceptor/SimpleKey.java index b9304539d9d..e6573045492 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/SimpleKey.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/SimpleKey.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2016 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. @@ -57,7 +57,7 @@ public class SimpleKey implements Serializable { @Override public final int hashCode() { - return hashCode; + return this.hashCode; } @Override diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/VariableNotAvailableException.java b/spring-context/src/main/java/org/springframework/cache/interceptor/VariableNotAvailableException.java index b6f52d61f23..6f7fdde3c22 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/VariableNotAvailableException.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/VariableNotAvailableException.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2016 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. @@ -37,6 +37,6 @@ class VariableNotAvailableException extends EvaluationException { public String getName() { - return name; + return this.name; } }