diff --git a/org.springframework.aspects/src/test/java/org/springframework/cache/config/annotation-cache-aspectj.xml b/org.springframework.aspects/src/test/java/org/springframework/cache/config/annotation-cache-aspectj.xml
index 741cf69e3a..da2514ccd5 100644
--- a/org.springframework.aspects/src/test/java/org/springframework/cache/config/annotation-cache-aspectj.xml
+++ b/org.springframework.aspects/src/test/java/org/springframework/cache/config/annotation-cache-aspectj.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/org.springframework.context/src/main/java/org/springframework/cache/Cache.java b/org.springframework.context/src/main/java/org/springframework/cache/Cache.java
index aab14aa7ad..b37030dbf0 100644
--- a/org.springframework.context/src/main/java/org/springframework/cache/Cache.java
+++ b/org.springframework.context/src/main/java/org/springframework/cache/Cache.java
@@ -26,18 +26,18 @@ package org.springframework.cache;
*
* @author Costin Leau
*/
-public interface Cache {
+public interface Cache {
/**
* A (wrapper) object representing a cache value.
*/
- interface ValueWrapper {
+ interface ValueWrapper {
/**
* Returns the actual value in the cache.
*
* @return cache value
*/
- V get();
+ Object get();
}
/**
@@ -62,7 +62,7 @@ public interface Cache {
* @return the value to which this cache maps the specified key, or
* null if the cache contains no mapping for this key.
*/
- ValueWrapper get(Object key);
+ ValueWrapper get(Object key);
/**
* Associates the specified value with the specified key in this cache.
@@ -72,7 +72,7 @@ public interface Cache {
* @param key key with which the specified value is to be associated.
* @param value value to be associated with the specified key.
*/
- void put(K key, V value);
+ void put(Object key, Object value);
/**
* Evicts the mapping for this key from this cache if it is present.
diff --git a/org.springframework.context/src/main/java/org/springframework/cache/CacheManager.java b/org.springframework.context/src/main/java/org/springframework/cache/CacheManager.java
index cdf6b960cb..268e9c3a40 100644
--- a/org.springframework.context/src/main/java/org/springframework/cache/CacheManager.java
+++ b/org.springframework.context/src/main/java/org/springframework/cache/CacheManager.java
@@ -32,7 +32,7 @@ public interface CacheManager {
* @param name cache identifier - cannot be null
* @return associated cache or null if none is found
*/
- Cache getCache(String name);
+ Cache getCache(String name);
/**
* Returns a collection of the caches known by this cache manager.
diff --git a/org.springframework.context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCache.java b/org.springframework.context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCache.java
index 17341b67dc..12468e878f 100644
--- a/org.springframework.context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCache.java
+++ b/org.springframework.context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCache.java
@@ -34,14 +34,14 @@ import org.springframework.cache.interceptor.DefaultValueWrapper;
*
* @author Costin Leau
*/
-public class ConcurrentMapCache implements Cache {
+public class ConcurrentMapCache implements Cache {
private static class NullHolder implements Serializable {
private static final long serialVersionUID = 1L;
}
private static final Object NULL_HOLDER = new NullHolder();
- private final ConcurrentMap store;
+ private final ConcurrentMap store;
private final String name;
private final boolean allowNullValues;
@@ -50,10 +50,10 @@ public class ConcurrentMapCache implements Cache {
}
public ConcurrentMapCache(String name) {
- this(new ConcurrentHashMap(), name, true);
+ this(new ConcurrentHashMap(), name, true);
}
- public ConcurrentMapCache(ConcurrentMap delegate, String name, boolean allowNullValues) {
+ public ConcurrentMapCache(ConcurrentMap delegate, String name, boolean allowNullValues) {
this.store = delegate;
this.name = name;
this.allowNullValues = allowNullValues;
@@ -67,7 +67,7 @@ public class ConcurrentMapCache implements Cache {
return allowNullValues;
}
- public ConcurrentMap getNativeCache() {
+ public ConcurrentMap getNativeCache() {
return store;
}
@@ -75,13 +75,12 @@ public class ConcurrentMapCache implements Cache {
store.clear();
}
- public ValueWrapper get(Object key) {
- V v = store.get(key);
- return (v != null ? new DefaultValueWrapper(filterNull(v)) : null);
+ public ValueWrapper get(Object key) {
+ Object v = store.get(key);
+ return (v != null ? new DefaultValueWrapper(filterNull(v)) : null);
}
- @SuppressWarnings("unchecked")
- public void put(K key, V value) {
+ public void put(Object key, Object value) {
if (allowNullValues && value == null) {
Map map = store;
map.put(key, NULL_HOLDER);
@@ -94,7 +93,7 @@ public class ConcurrentMapCache implements Cache {
store.remove(key);
}
- protected V filterNull(V val) {
+ protected Object filterNull(Object val) {
if (allowNullValues && val == NULL_HOLDER) {
return null;
}
diff --git a/org.springframework.context/src/main/java/org/springframework/cache/concurrent/ConcurrentCacheFactoryBean.java b/org.springframework.context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCacheFactoryBean.java
similarity index 75%
rename from org.springframework.context/src/main/java/org/springframework/cache/concurrent/ConcurrentCacheFactoryBean.java
rename to org.springframework.context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCacheFactoryBean.java
index 66bf95c42a..6e6a501dd6 100644
--- a/org.springframework.context/src/main/java/org/springframework/cache/concurrent/ConcurrentCacheFactoryBean.java
+++ b/org.springframework.context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCacheFactoryBean.java
@@ -28,19 +28,19 @@ import org.springframework.util.StringUtils;
*
* @author Costin Leau
*/
-public class ConcurrentCacheFactoryBean implements FactoryBean>, BeanNameAware,
+public class ConcurrentMapCacheFactoryBean implements FactoryBean, BeanNameAware,
InitializingBean {
private String name = "";
- private ConcurrentMapCache cache;
+ private ConcurrentMapCache cache;
- private ConcurrentMap store;
+ private ConcurrentMap store;
public void afterPropertiesSet() {
- cache = (store == null ? new ConcurrentMapCache(name) : new ConcurrentMapCache(store, name, true));
+ cache = (store == null ? new ConcurrentMapCache(name) : new ConcurrentMapCache(store, name, true));
}
- public ConcurrentMapCache getObject() throws Exception {
+ public ConcurrentMapCache getObject() throws Exception {
return cache;
}
@@ -62,7 +62,7 @@ public class ConcurrentCacheFactoryBean implements FactoryBean store) {
+ public void setStore(ConcurrentMap store) {
this.store = store;
}
}
\ No newline at end of file
diff --git a/org.springframework.context/src/main/java/org/springframework/cache/ehcache/EhCacheCache.java b/org.springframework.context/src/main/java/org/springframework/cache/ehcache/EhCacheCache.java
index 4ec6e609ba..8845ff0187 100644
--- a/org.springframework.context/src/main/java/org/springframework/cache/ehcache/EhCacheCache.java
+++ b/org.springframework.context/src/main/java/org/springframework/cache/ehcache/EhCacheCache.java
@@ -29,7 +29,7 @@ import org.springframework.util.Assert;
*
* @author Costin Leau
*/
-public class EhCacheCache implements Cache