Make sure that attributes are cloned every time
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/jcs/trunk@1798714 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheManager.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheManager.java
index 2d012ce..ff0979d 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheManager.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheManager.java
@@ -527,7 +527,7 @@
@Override
public <K, V> CompositeCache<K, V> getCache( String cacheName )
{
- return getCache( cacheName, this.defaultCacheAttr.clone() );
+ return getCache( cacheName, getDefaultCacheAttributes() );
}
/**
@@ -540,7 +540,7 @@
public <K, V> CompositeCache<K, V> getCache( String cacheName, ICompositeCacheAttributes cattr )
{
cattr.setCacheName( cacheName );
- return getCache( cattr, this.defaultElementAttr );
+ return getCache( cattr, getDefaultElementAttributes() );
}
/**
@@ -565,7 +565,7 @@
*/
public <K, V> CompositeCache<K, V> getCache( ICompositeCacheAttributes cattr )
{
- return getCache( cattr, this.defaultElementAttr );
+ return getCache( cattr, getDefaultElementAttributes() );
}
/**