Browse Source

Polish

pull/942/head
Stephane Nicoll 10 years ago
parent
commit
cd903e26de
  1. 4
      spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCacheManager.java
  2. 18
      spring-context/src/main/java/org/springframework/cache/config/CacheAdviceParser.java
  3. 4
      spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperation.java
  4. 4
      spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationInvoker.java
  5. 4
      spring-context/src/main/java/org/springframework/cache/interceptor/CachePutOperation.java
  6. 6
      spring-context/src/main/java/org/springframework/cache/interceptor/CacheableOperation.java
  7. 4
      spring-context/src/main/java/org/springframework/cache/interceptor/NamedCacheResolver.java
  8. 4
      spring-context/src/main/java/org/springframework/cache/interceptor/SimpleKey.java
  9. 4
      spring-context/src/main/java/org/springframework/cache/interceptor/VariableNotAvailableException.java

4
spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCacheManager.java vendored

@ -1,5 +1,5 @@ @@ -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 @@ -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<Object, Object>(256),
isAllowNullValues(), actualSerialization);

18
spring-context/src/main/java/org/springframework/cache/config/CacheAdviceParser.java vendored

@ -1,5 +1,5 @@ @@ -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 { @@ -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 { @@ -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);
}
}

4
spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperation.java vendored

@ -1,5 +1,5 @@ @@ -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 { @@ -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;
}

4
spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationInvoker.java vendored

@ -1,5 +1,5 @@ @@ -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 { @@ -52,7 +52,7 @@ public interface CacheOperationInvoker {
}
public Throwable getOriginal() {
return original;
return this.original;
}
}

4
spring-context/src/main/java/org/springframework/cache/interceptor/CachePutOperation.java vendored

@ -1,5 +1,5 @@ @@ -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 { @@ -29,7 +29,7 @@ public class CachePutOperation extends CacheOperation {
public String getUnless() {
return unless;
return this.unless;
}
public void setUnless(String unless) {

6
spring-context/src/main/java/org/springframework/cache/interceptor/CacheableOperation.java vendored

@ -1,5 +1,5 @@ @@ -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 { @@ -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 { @@ -39,7 +39,7 @@ public class CacheableOperation extends CacheOperation {
}
public boolean isSync() {
return sync;
return this.sync;
}
public void setSync(boolean sync) {

4
spring-context/src/main/java/org/springframework/cache/interceptor/NamedCacheResolver.java vendored

@ -1,5 +1,5 @@ @@ -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 { @@ -51,7 +51,7 @@ public class NamedCacheResolver extends AbstractCacheResolver {
@Override
protected Collection<String> getCacheNames(CacheOperationInvocationContext<?> context) {
return cacheNames;
return this.cacheNames;
}
}

4
spring-context/src/main/java/org/springframework/cache/interceptor/SimpleKey.java vendored

@ -1,5 +1,5 @@ @@ -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 { @@ -57,7 +57,7 @@ public class SimpleKey implements Serializable {
@Override
public final int hashCode() {
return hashCode;
return this.hashCode;
}
@Override

4
spring-context/src/main/java/org/springframework/cache/interceptor/VariableNotAvailableException.java vendored

@ -1,5 +1,5 @@ @@ -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 { @@ -37,6 +37,6 @@ class VariableNotAvailableException extends EvaluationException {
public String getName() {
return name;
return this.name;
}
}

Loading…
Cancel
Save