commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1337332 - in /commons/proper/jcs/branches/generics-interface/src: java/org/apache/jcs/auxiliary/disk/block/ java/org/apache/jcs/auxiliary/disk/indexed/ java/org/apache/jcs/auxiliary/disk/jdbc/ java/org/apache/jcs/auxiliary/disk/jdbc/mysql/...
Date Fri, 11 May 2012 19:12:36 GMT
Author: tv
Date: Fri May 11 19:12:35 2012
New Revision: 1337332

URL: http://svn.apache.org/viewvc?rev=1337332&view=rev
Log:
Ongoing chase for broken tests

Modified:
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/block/BlockDiskCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheManager.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheManagerAbstractTemplate.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheManager.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/control/group/GroupAttrName.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/AbstractDoulbeLinkedListMemoryCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/lru/LHMLRUMemoryCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/utils/struct/LRUMap.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/access/TestCacheAccess.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/LRUMapJCSUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheManagerUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheManagerUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/lateral/LateralCacheNoWaitFacadeUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheClientTester.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheListenerUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/TestRemoteCache.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheServiceUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheSeviceFactoryUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/access/JCSWorkerUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/JCSvsCommonsLRUMapPerformanceTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapConcurrentTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapConcurrentUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapPerformanceTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapUnitTest.java

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/block/BlockDiskCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/block/BlockDiskCache.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/block/BlockDiskCache.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/block/BlockDiskCache.java Fri May 11 19:12:35 2012
@@ -220,7 +220,7 @@ public class BlockDiskCache<K extends Se
         {
             for ( K key : this.keyStore.keySet())
             {
-                if ( key instanceof GroupAttrName && ( (GroupAttrName<K>) key ).groupId.equals( groupId ) )
+                if ( key instanceof GroupAttrName && ( (GroupAttrName<?>) key ).groupId.equals( groupId ) )
                 {
                     keys.add( ( (GroupAttrName<K>) key ).attrName );
                 }
@@ -449,7 +449,7 @@ public class BlockDiskCache<K extends Se
                     }
                 }
             }
-            else if ( key instanceof GroupId )
+            else if ( key instanceof GroupAttrName && ((GroupAttrName<?>)key).attrName == null )
             {
                 // remove all keys of the same name hierarchy.
                 Iterator<Map.Entry<K, int[]>> iter = this.keyStore.entrySet().iterator();
@@ -458,7 +458,8 @@ public class BlockDiskCache<K extends Se
                     Map.Entry<K, int[]> entry = iter.next();
                     K k = entry.getKey();
 
-                    if ( k instanceof GroupAttrName && ( (GroupAttrName<K>) k ).groupId.equals( key ) )
+                    if ( k instanceof GroupAttrName &&
+                        ((GroupAttrName<?>)k).groupId.equals(((GroupAttrName<?>)key).groupId))
                     {
                         int[] ded = this.keyStore.get( key );
                         this.dataFile.freeBlocks( ded );

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCache.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCache.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCache.java Fri May 11 19:12:35 2012
@@ -748,7 +748,7 @@ public class IndexedDiskCache<K extends 
 
             for (Serializable k : keyHash.keySet())
             {
-                if ( k instanceof GroupAttrName && ( (GroupAttrName<K>) k ).groupId.equals( groupId ) )
+                if ( k instanceof GroupAttrName && ( (GroupAttrName<?>) k ).groupId.equals( groupId ) )
                 {
                     keys.add( ( (GroupAttrName<K>) k ).attrName );
                 }
@@ -793,9 +793,9 @@ public class IndexedDiskCache<K extends 
             {
                 removed = performPartialKeyRemoval( (String) key );
             }
-            else if ( key instanceof GroupId )
+            else if ( key instanceof GroupAttrName && ((GroupAttrName<?>)key).attrName == null )
             {
-                removed = performGroupRemoval( (GroupId) key );
+                removed = performGroupRemoval( ((GroupAttrName<?>)key).groupId );
             }
             else
             {
@@ -883,7 +883,7 @@ public class IndexedDiskCache<K extends 
         // remove all keys of the same name hierarchy.
         for (K k : keyHash.keySet())
         {
-            if ( k instanceof GroupAttrName && ( (GroupAttrName) k ).groupId.equals( key ) )
+            if ( k instanceof GroupAttrName && ( (GroupAttrName<?>) k ).groupId.equals( key ) )
             {
                 itemsToRemove.add( k );
             }

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheManager.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheManager.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheManager.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheManager.java Fri May 11 19:12:35 2012
@@ -23,7 +23,6 @@ import java.io.Serializable;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.jcs.auxiliary.AuxiliaryCache;
 import org.apache.jcs.engine.behavior.ICompositeCacheManager;
 import org.apache.jcs.engine.behavior.IElementSerializer;
 import org.apache.jcs.engine.logging.behavior.ICacheEventLogger;
@@ -110,7 +109,7 @@ public class JDBCDiskCacheManager
      * @param cacheName
      * @return The cache value
      */
-    public <K extends Serializable, V extends Serializable> AuxiliaryCache<K, V> getCache( String cacheName )
+    public <K extends Serializable, V extends Serializable> JDBCDiskCache<K, V> getCache( String cacheName )
     {
         JDBCDiskCacheAttributes cattr = (JDBCDiskCacheAttributes) defaultJDBCDiskCacheAttributes.copy();
         cattr.setCacheName( cacheName );
@@ -124,9 +123,9 @@ public class JDBCDiskCacheManager
      * @param tableState
      * @return AuxiliaryCache
      */
-    protected <K extends Serializable, V extends Serializable> AuxiliaryCache<K, V> createJDBCDiskCache( JDBCDiskCacheAttributes cattr, TableState tableState )
+    protected <K extends Serializable, V extends Serializable> JDBCDiskCache<K, V> createJDBCDiskCache( JDBCDiskCacheAttributes cattr, TableState tableState )
     {
-        AuxiliaryCache<K, V> raf;
+        JDBCDiskCache<K, V> raf;
         raf = new JDBCDiskCache<K, V>( cattr, tableState, getCompositeCacheManager() );
         return raf;
     }

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheManagerAbstractTemplate.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheManagerAbstractTemplate.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheManagerAbstractTemplate.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheManagerAbstractTemplate.java Fri May 11 19:12:35 2012
@@ -53,8 +53,8 @@ public abstract class JDBCDiskCacheManag
     protected static int clients;
 
     /** A map of JDBCDiskCache objects to region names. */
-    protected static Hashtable<String, AuxiliaryCache<? extends Serializable, ? extends Serializable>> caches =
-        new Hashtable<String, AuxiliaryCache<? extends Serializable, ? extends Serializable>>();
+    protected static Hashtable<String, JDBCDiskCache<? extends Serializable, ? extends Serializable>> caches =
+        new Hashtable<String, JDBCDiskCache<? extends Serializable, ? extends Serializable>>();
 
     /**
      * A map of TableState objects to table names. Each cache has a table state object, which is
@@ -78,7 +78,7 @@ public abstract class JDBCDiskCacheManag
      * @param tableState An object used by multiple processes to indicate state.
      * @return AuxiliaryCache -- a JDBCDiskCache
      */
-    protected abstract <K extends Serializable, V extends Serializable> AuxiliaryCache<K, V> createJDBCDiskCache( JDBCDiskCacheAttributes cattr, TableState tableState );
+    protected abstract <K extends Serializable, V extends Serializable> JDBCDiskCache<K, V> createJDBCDiskCache( JDBCDiskCacheAttributes cattr, TableState tableState );
 
     /**
      * Creates a JDBCDiskCache for the region if one doesn't exist, else it returns the pre-created
@@ -87,15 +87,15 @@ public abstract class JDBCDiskCacheManag
      * @param cattr
      * @return The cache value
      */
-    public <K extends Serializable, V extends Serializable> AuxiliaryCache<K, V> getCache( JDBCDiskCacheAttributes cattr )
+    public <K extends Serializable, V extends Serializable> JDBCDiskCache<K, V> getCache( JDBCDiskCacheAttributes cattr )
     {
-        AuxiliaryCache<K, V> diskCache = null;
+        JDBCDiskCache<K, V> diskCache = null;
 
         log.debug( "cacheName = " + cattr.getCacheName() );
 
         synchronized ( caches )
         {
-            diskCache = (AuxiliaryCache<K, V>) caches.get( cattr.getCacheName() );
+            diskCache = (JDBCDiskCache<K, V>) caches.get( cattr.getCacheName() );
 
             if ( diskCache == null )
             {
@@ -163,7 +163,7 @@ public abstract class JDBCDiskCacheManag
      */
     public void freeCache( String name )
     {
-        JDBCDiskCache<?, ?> raf = (JDBCDiskCache<?, ?>) caches.get( name );
+        JDBCDiskCache<?, ?> raf = caches.get( name );
         if ( raf != null )
         {
             try
@@ -197,11 +197,11 @@ public abstract class JDBCDiskCacheManag
         }
         synchronized ( caches )
         {
-            Enumeration<AuxiliaryCache<?, ?>> allCaches = caches.elements();
+            Enumeration<JDBCDiskCache<?, ?>> allCaches = caches.elements();
 
             while ( allCaches.hasMoreElements() )
             {
-                JDBCDiskCache<?, ?> raf = (JDBCDiskCache<?, ?>) allCaches.nextElement();
+                JDBCDiskCache<?, ?> raf = allCaches.nextElement();
                 if ( raf != null )
                 {
                     try

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheManager.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheManager.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheManager.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheManager.java Fri May 11 19:12:35 2012
@@ -26,7 +26,7 @@ import java.util.TimerTask;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.jcs.auxiliary.AuxiliaryCache;
+import org.apache.jcs.auxiliary.disk.jdbc.JDBCDiskCache;
 import org.apache.jcs.auxiliary.disk.jdbc.JDBCDiskCacheAttributes;
 import org.apache.jcs.auxiliary.disk.jdbc.JDBCDiskCacheManagerAbstractTemplate;
 import org.apache.jcs.auxiliary.disk.jdbc.JDBCDiskCachePoolAccess;
@@ -129,7 +129,7 @@ public class MySQLDiskCacheManager
      * @param cacheName
      * @return The cache value
      */
-    public <K extends Serializable, V extends Serializable> AuxiliaryCache<K, V> getCache( String cacheName )
+    public <K extends Serializable, V extends Serializable> JDBCDiskCache<K, V> getCache( String cacheName )
     {
         MySQLDiskCacheAttributes cattr = (MySQLDiskCacheAttributes) defaultJDBCDiskCacheAttributes.copy();
         cattr.setCacheName( cacheName );
@@ -144,7 +144,7 @@ public class MySQLDiskCacheManager
      * @return AuxiliaryCache
      */
     @Override
-    protected <K extends Serializable, V extends Serializable> AuxiliaryCache<K, V> createJDBCDiskCache( JDBCDiskCacheAttributes cattr, TableState tableState )
+    protected <K extends Serializable, V extends Serializable> MySQLDiskCache<K, V> createJDBCDiskCache( JDBCDiskCacheAttributes cattr, TableState tableState )
     {
         MySQLDiskCache<K, V> diskCache = new MySQLDiskCache<K, V>( (MySQLDiskCacheAttributes) cattr, tableState, getCompositeCacheManager() );
 

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/control/group/GroupAttrName.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/control/group/GroupAttrName.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/control/group/GroupAttrName.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/control/group/GroupAttrName.java Fri May 11 19:12:35 2012
@@ -49,10 +49,9 @@ public class GroupAttrName<T extends Ser
         this.groupId = groupId;
         this.attrName = attrName;
 
-        if ( groupId == null || attrName == null )
+        if ( groupId == null )
         {
-            throw new IllegalArgumentException( "groupId " + groupId + " and attrName " + attrName
-                + ", must not be null." );
+            throw new IllegalArgumentException( "groupId must not be null." );
         }
     }
 
@@ -68,7 +67,22 @@ public class GroupAttrName<T extends Ser
             return false;
         }
         GroupAttrName<?> to = (GroupAttrName<?>) obj;
-        return groupId.equals( to.groupId ) && attrName.equals( to.attrName );
+
+        if (groupId.equals( to.groupId ))
+        {
+            if (attrName == null && to.attrName == null)
+            {
+                return true;
+            }
+            else if (attrName == null || to.attrName == null)
+            {
+                return false;
+            }
+
+            return  attrName.equals( to.attrName );
+        }
+
+        return false;
     }
 
     /**
@@ -76,6 +90,11 @@ public class GroupAttrName<T extends Ser
      */
     public int hashCode()
     {
+        if (attrName == null)
+        {
+            return groupId.hashCode();
+        }
+
         return groupId.hashCode() ^ attrName.hashCode();
     }
 

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/AbstractDoulbeLinkedListMemoryCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/AbstractDoulbeLinkedListMemoryCache.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/AbstractDoulbeLinkedListMemoryCache.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/AbstractDoulbeLinkedListMemoryCache.java Fri May 11 19:12:35 2012
@@ -346,7 +346,7 @@ public abstract class AbstractDoulbeLink
                     K k = entry.getKey();
 
                     if ( k instanceof GroupAttrName &&
-                        ((GroupAttrName)k).groupId.equals(((GroupAttrName)key).groupId))
+                        ((GroupAttrName<?>)k).groupId.equals(((GroupAttrName<?>)key).groupId))
                     {
                         list.remove( entry.getValue() );
                         itr.remove();
@@ -464,7 +464,7 @@ public abstract class AbstractDoulbeLink
                 log.error( "key toString=" + key.toString() );
                 if ( key instanceof GroupAttrName )
                 {
-                    GroupAttrName name = (GroupAttrName) key;
+                    GroupAttrName<?> name = (GroupAttrName<?>) key;
                     log.error( "GroupID hashcode=" + name.groupId.hashCode() );
                     log.error( "GroupID.class=" + name.groupId.getClass() );
                     log.error( "AttrName hashcode=" + name.attrName.hashCode() );

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/lru/LHMLRUMemoryCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/lru/LHMLRUMemoryCache.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/lru/LHMLRUMemoryCache.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/lru/LHMLRUMemoryCache.java Fri May 11 19:12:35 2012
@@ -33,7 +33,6 @@ import org.apache.jcs.engine.CacheConsta
 import org.apache.jcs.engine.behavior.ICacheElement;
 import org.apache.jcs.engine.control.CompositeCache;
 import org.apache.jcs.engine.control.group.GroupAttrName;
-import org.apache.jcs.engine.control.group.GroupId;
 import org.apache.jcs.engine.memory.AbstractMemoryCache;
 import org.apache.jcs.engine.memory.util.MemoryElementDescriptor;
 import org.apache.jcs.engine.stats.StatElement;
@@ -193,7 +192,7 @@ public class LHMLRUMemoryCache<K extends
                 }
             }
         }
-        else if ( key instanceof GroupId )
+        else if ( key instanceof GroupAttrName && ((GroupAttrName<?>)key).attrName == null )
         {
             // remove all keys of the same name hierarchy.
             synchronized ( map )
@@ -203,7 +202,8 @@ public class LHMLRUMemoryCache<K extends
                     Map.Entry<K, MemoryElementDescriptor<K, V>> entry = itr.next();
                     K k = entry.getKey();
 
-                    if ( k instanceof GroupAttrName && ( (GroupAttrName) k ).groupId.equals( key ) )
+                    if ( k instanceof GroupAttrName &&
+                        ((GroupAttrName<?>)k).groupId.equals(((GroupAttrName<?>)key).groupId) )
                     {
                         itr.remove();
                         removed = true;

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/utils/struct/LRUMap.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/utils/struct/LRUMap.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/utils/struct/LRUMap.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/utils/struct/LRUMap.java Fri May 11 19:12:35 2012
@@ -455,7 +455,7 @@ public class LRUMap<K, V>
                 log.error( "key toString=" + key.toString() );
                 if ( key instanceof GroupAttrName )
                 {
-                    GroupAttrName name = (GroupAttrName) key;
+                    GroupAttrName<?> name = (GroupAttrName<?>) key;
                     log.error( "GroupID hashcode=" + name.groupId.hashCode() );
                     log.error( "GroupID.class=" + name.groupId.getClass() );
                     log.error( "AttrName hashcode=" + name.attrName.hashCode() );

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/access/TestCacheAccess.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/access/TestCacheAccess.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/access/TestCacheAccess.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/access/TestCacheAccess.java Fri May 11 19:12:35 2012
@@ -696,7 +696,7 @@ public class TestCacheAccess
             long n_start = System.currentTimeMillis();
             try
             {
-                Map results = cache_control.getMatching( pattern );
+                Map<String, String> results = cache_control.getMatching( pattern );
                 if ( show && results != null )
                 {
                     p( results.toString() );
@@ -951,11 +951,11 @@ public class TestCacheAccess
      */
     public void getAttributeNames( String groupName )
     {
-        Iterator iter = cache_control.getGroupKeys( groupName ).iterator();
+        Iterator<String> iter = cache_control.getGroupKeys( groupName ).iterator();
 
         while ( iter.hasNext() )
         {
-            p( "=" + (String) iter.next() );
+            p( "=" + iter.next() );
         }
     }
 }

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/LRUMapJCSUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/LRUMapJCSUnitTest.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/LRUMapJCSUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/LRUMapJCSUnitTest.java Fri May 11 19:12:35 2012
@@ -16,7 +16,7 @@ public class LRUMapJCSUnitTest
         // SETUP
 
         // DO WORK
-        LRUMapJCS map = new LRUMapJCS();
+        LRUMapJCS<String, String> map = new LRUMapJCS<String, String>();
 
         // VERIFY
         assertEquals( "Should be unlimted", -1, map.getMaxObjects() );
@@ -29,7 +29,7 @@ public class LRUMapJCSUnitTest
         int expected = 100;
 
         // DO WORK
-        LRUMapJCS map = new LRUMapJCS( expected );
+        LRUMapJCS<String, String> map = new LRUMapJCS<String, String>( expected );
 
         // VERIFY
         assertEquals( "Should be expected", expected, map.getMaxObjects() );
@@ -42,7 +42,7 @@ public class LRUMapJCSUnitTest
         StringWriter stringWriter = new StringWriter();
         TestLogConfigurationUtil.configureLogger( stringWriter, LRUMapJCS.class.getName() );
 
-        LRUMapJCS map = new LRUMapJCS();
+        LRUMapJCS<String, String> map = new LRUMapJCS<String, String>();
 
         String key = "myKey";
         String value = "myValue";

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheManagerUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheManagerUnitTest.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheManagerUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheManagerUnitTest.java Fri May 11 19:12:35 2012
@@ -27,7 +27,7 @@ public class JDBCDiskCacheManagerUnitTes
             .getUnconfiguredInstance(), cacheEventLogger, elementSerializer );
 
         // DO WORK
-        JDBCDiskCache cache = (JDBCDiskCache) manager.getCache( cacheName );
+        JDBCDiskCache<String, String> cache = manager.getCache( cacheName );
 
         // VERIFY
         assertEquals( "wrong cacheEventLogger", cacheEventLogger, cache.getCacheEventLogger() );

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheManagerUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheManagerUnitTest.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheManagerUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheManagerUnitTest.java Fri May 11 19:12:35 2012
@@ -27,7 +27,7 @@ public class MySQLDiskCacheManagerUnitTe
                                                                            elementSerializer );
 
         // DO WORK
-        MySQLDiskCache cache = (MySQLDiskCache) manager.getCache( cacheName );
+        MySQLDiskCache<String, String> cache = (MySQLDiskCache) manager.getCache( cacheName );
 
         // VERIFY
         assertEquals( "wrong cacheEventLogger", cacheEventLogger, cache.getCacheEventLogger() );

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/lateral/LateralCacheNoWaitFacadeUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/lateral/LateralCacheNoWaitFacadeUnitTest.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/lateral/LateralCacheNoWaitFacadeUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/lateral/LateralCacheNoWaitFacadeUnitTest.java Fri May 11 19:12:35 2012
@@ -1,9 +1,9 @@
 package org.apache.jcs.auxiliary.lateral;
 
-import org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes;
-
 import junit.framework.TestCase;
 
+import org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes;
+
 /**
  * Tests for LateralCacheNoWaitFacade.
  */
@@ -16,78 +16,78 @@ public class LateralCacheNoWaitFacadeUni
     public void testAddThenRemoveNoWait_InList()
     {
         // SETUP
-        LateralCacheNoWait[] noWaits = new LateralCacheNoWait[0];
+        LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
         ILateralCacheAttributes cattr = new LateralCacheAttributes();
         cattr.setCacheName( "testCache1" );
-        
-        LateralCacheNoWaitFacade facade = new LateralCacheNoWaitFacade( noWaits, cattr );
-        
-        LateralCache cache = new LateralCache( cattr );
-        LateralCacheNoWait noWait = new LateralCacheNoWait( cache );
-        
+
+        LateralCacheNoWaitFacade<String, String> facade = new LateralCacheNoWaitFacade<String, String>( noWaits, cattr );
+
+        LateralCache<String, String> cache = new LateralCache<String, String>( cattr );
+        LateralCacheNoWait<String, String> noWait = new LateralCacheNoWait<String, String>( cache );
+
         // DO WORK
         facade.addNoWait( noWait );
 
         // VERIFY
         assertTrue( "Should be in the list.", facade.containsNoWait( noWait ) );
-        
+
         // DO WORK
         facade.removeNoWait( noWait );
-        
+
         // VERIFY
-        assertEquals( "Should have 0", 0, facade.noWaits.length );               
+        assertEquals( "Should have 0", 0, facade.noWaits.length );
         assertFalse( "Should not be in the list. ", facade.containsNoWait( noWait ) );
     }
-    
+
     /**
      * Verify that we can remove an item.
      */
     public void testAddThenRemoveNoWait_InListSize2()
     {
         // SETUP
-        LateralCacheNoWait[] noWaits = new LateralCacheNoWait[0];
+        LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
         ILateralCacheAttributes cattr = new LateralCacheAttributes();
         cattr.setCacheName( "testCache1" );
-        
-        LateralCacheNoWaitFacade facade = new LateralCacheNoWaitFacade( noWaits, cattr );
-        
-        LateralCache cache = new LateralCache( cattr );
-        LateralCacheNoWait noWait = new LateralCacheNoWait( cache );
-        LateralCacheNoWait noWait2 = new LateralCacheNoWait( cache );
-        
+
+        LateralCacheNoWaitFacade<String, String> facade = new LateralCacheNoWaitFacade<String, String>( noWaits, cattr );
+
+        LateralCache<String, String> cache = new LateralCache<String, String>( cattr );
+        LateralCacheNoWait<String, String> noWait = new LateralCacheNoWait<String, String>( cache );
+        LateralCacheNoWait<String, String> noWait2 = new LateralCacheNoWait<String, String>( cache );
+
         // DO WORK
         facade.addNoWait( noWait );
         facade.addNoWait( noWait2 );
 
         // VERIFY
-        assertEquals( "Should have 2", 2, facade.noWaits.length );        
+        assertEquals( "Should have 2", 2, facade.noWaits.length );
         assertTrue( "Should be in the list.", facade.containsNoWait( noWait ) );
         assertTrue( "Should be in the list.", facade.containsNoWait( noWait2 ) );
-        
+
         // DO WORK
         facade.removeNoWait( noWait );
-        
-        // VERIFY        
-        assertEquals( "Should only have 1", 1, facade.noWaits.length );        
+
+        // VERIFY
+        assertEquals( "Should only have 1", 1, facade.noWaits.length );
         assertFalse( "Should not be in the list. ", facade.containsNoWait( noWait ) );
         assertTrue( "Should be in the list.", facade.containsNoWait( noWait2 ) );
     }
-    
+
     /**
      * Verify that we can remove an item.
      */
     public void testAdd_InList()
     {
         // SETUP
-        LateralCacheNoWait[] noWaits = new LateralCacheNoWait[0];
+        LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
         ILateralCacheAttributes cattr = new LateralCacheAttributes();
         cattr.setCacheName( "testCache1" );
-        
-        LateralCacheNoWaitFacade facade = new LateralCacheNoWaitFacade( noWaits, cattr );
-        
-        LateralCache cache = new LateralCache( cattr );
-        LateralCacheNoWait noWait = new LateralCacheNoWait( cache );
-        
+
+        LateralCacheNoWaitFacade<String, String> facade = new LateralCacheNoWaitFacade<String, String>( noWaits, cattr );
+
+        LateralCache<String, String> cache = new LateralCache<String, String>( cattr );
+        LateralCacheNoWait<String, String> noWait = new LateralCacheNoWait<String, String>( cache );
+
         // DO WORK
         facade.addNoWait( noWait );
         facade.addNoWait( noWait );
@@ -96,26 +96,26 @@ public class LateralCacheNoWaitFacadeUni
         assertTrue( "Should be in the list.", facade.containsNoWait( noWait ) );
         assertEquals( "Should only have 1", 1, facade.noWaits.length );
     }
-    
+
     /**
      * Verify that we can remove an item.
      */
     public void testAddThenRemoveNoWait_NotInList()
     {
         // SETUP
-        LateralCacheNoWait[] noWaits = new LateralCacheNoWait[0];
+        LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
         ILateralCacheAttributes cattr = new LateralCacheAttributes();
         cattr.setCacheName( "testCache1" );
-        
-        LateralCacheNoWaitFacade facade = new LateralCacheNoWaitFacade( noWaits, cattr );
-        
-        LateralCache cache = new LateralCache( cattr );
-        LateralCacheNoWait noWait = new LateralCacheNoWait( cache );       
-        
+
+        LateralCacheNoWaitFacade<String, String> facade = new LateralCacheNoWaitFacade<String, String>( noWaits, cattr );
+
+        LateralCache<String, String> cache = new LateralCache<String, String>( cattr );
+        LateralCacheNoWait<String, String> noWait = new LateralCacheNoWait<String, String>( cache );
+
         // DO WORK
         facade.removeNoWait( noWait );
-        
+
         // VERIFY
         assertFalse( "Should not be in the list.", facade.containsNoWait( noWait ) );
-    }    
+    }
 }

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java Fri May 11 19:12:35 2012
@@ -50,11 +50,11 @@ public class LateralTCPDiscoveryListener
     {
         // SETUP
         String cacheName = "testAddNoWaitFacade_NotInList";
-        LateralCacheNoWait[] noWaits = new LateralCacheNoWait[0];
+        LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
         ILateralCacheAttributes cattr = new LateralCacheAttributes();
         cattr.setCacheName( cacheName );
 
-        LateralCacheNoWaitFacade facade = new LateralCacheNoWaitFacade( noWaits, cattr );
+        LateralCacheNoWaitFacade<String, String> facade = new LateralCacheNoWaitFacade<String, String>( noWaits, cattr );
 
         // DO WORK
         listener.addNoWaitFacade( cacheName, facade );
@@ -70,15 +70,15 @@ public class LateralTCPDiscoveryListener
     {
         // SETUP
         String cacheName = "testAddNoWaitFacade_FacadeInList";
-        LateralCacheNoWait[] noWaits = new LateralCacheNoWait[0];
+        LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
         ILateralCacheAttributes cattr = new LateralCacheAttributes();
         cattr.setCacheName( cacheName );
 
-        LateralCacheNoWaitFacade facade = new LateralCacheNoWaitFacade( noWaits, cattr );
+        LateralCacheNoWaitFacade<String, String> facade = new LateralCacheNoWaitFacade<String, String>( noWaits, cattr );
         listener.addNoWaitFacade( cacheName, facade );
 
-        LateralCache cache = new LateralCache( cattr );
-        LateralCacheNoWait noWait = new LateralCacheNoWait( cache );
+        LateralCache<String, String> cache = new LateralCache<String, String>( cattr );
+        LateralCacheNoWait<String, String> noWait = new LateralCacheNoWait<String, String>( cache );
 
         // DO WORK
         boolean result = listener.addNoWait( noWait );
@@ -97,8 +97,8 @@ public class LateralTCPDiscoveryListener
         ILateralCacheAttributes cattr = new LateralCacheAttributes();
         cattr.setCacheName( cacheName );
 
-        LateralCache cache = new LateralCache( cattr );
-        LateralCacheNoWait noWait = new LateralCacheNoWait( cache );
+        LateralCache<String, String> cache = new LateralCache<String, String>( cattr );
+        LateralCacheNoWait<String, String> noWait = new LateralCacheNoWait<String, String>( cache );
 
         // DO WORK
         boolean result = listener.addNoWait( noWait );
@@ -117,8 +117,8 @@ public class LateralTCPDiscoveryListener
         ILateralCacheAttributes cattr = new LateralCacheAttributes();
         cattr.setCacheName( cacheName );
 
-        LateralCache cache = new LateralCache( cattr );
-        LateralCacheNoWait noWait = new LateralCacheNoWait( cache );
+        LateralCache<String, String> cache = new LateralCache<String, String>( cattr );
+        LateralCacheNoWait<String, String> noWait = new LateralCacheNoWait<String, String>( cache );
 
         // DO WORK
         boolean result = listener.removeNoWait( noWait );
@@ -134,15 +134,15 @@ public class LateralTCPDiscoveryListener
     {
         // SETUP
         String cacheName = "testAddNoWaitFacade_FacadeInList";
-        LateralCacheNoWait[] noWaits = new LateralCacheNoWait[0];
+        LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
         ILateralCacheAttributes cattr = new LateralCacheAttributes();
         cattr.setCacheName( cacheName );
 
-        LateralCacheNoWaitFacade facade = new LateralCacheNoWaitFacade( noWaits, cattr );
+        LateralCacheNoWaitFacade<String, String> facade = new LateralCacheNoWaitFacade<String, String>( noWaits, cattr );
         listener.addNoWaitFacade( cacheName, facade );
 
-        LateralCache cache = new LateralCache( cattr );
-        LateralCacheNoWait noWait = new LateralCacheNoWait( cache );
+        LateralCache<String, String> cache = new LateralCache<String, String>( cattr );
+        LateralCacheNoWait<String, String> noWait = new LateralCacheNoWait<String, String>( cache );
 
         // DO WORK
         boolean result = listener.removeNoWait( noWait );
@@ -158,15 +158,15 @@ public class LateralTCPDiscoveryListener
     {
         // SETUP
         String cacheName = "testRemoveNoWaitFacade_FacadeInListNoWaitIs";
-        LateralCacheNoWait[] noWaits = new LateralCacheNoWait[0];
+        LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
         ILateralCacheAttributes cattr = new LateralCacheAttributes();
         cattr.setCacheName( cacheName );
 
-        LateralCacheNoWaitFacade facade = new LateralCacheNoWaitFacade( noWaits, cattr );
+        LateralCacheNoWaitFacade<String, String> facade = new LateralCacheNoWaitFacade<String, String>( noWaits, cattr );
         listener.addNoWaitFacade( cacheName, facade );
 
-        LateralCache cache = new LateralCache( cattr );
-        LateralCacheNoWait noWait = new LateralCacheNoWait( cache );
+        LateralCache<String, String> cache = new LateralCache<String, String>( cattr );
+        LateralCacheNoWait<String, String> noWait = new LateralCacheNoWait<String, String>( cache );
         listener.addNoWait( noWait );
 
         // DO WORK
@@ -199,12 +199,12 @@ public class LateralTCPDiscoveryListener
         lca.setTcpServer( service.getServiceAddress() + ":" + service.getServicePort() );
         LateralTCPCacheManager lcm = LateralTCPCacheManager.getInstance( lca, cacheMgr, cacheEventLogger,
                                                                          elementSerializer );
-        LateralCacheNoWait noWait = (LateralCacheNoWait) lcm.getCache( cacheName );
+        LateralCacheNoWait<String, String> noWait = (LateralCacheNoWait) lcm.getCache( cacheName );
 
-        LateralCacheNoWait[] noWaits = new LateralCacheNoWait[0];
+        LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
         ILateralCacheAttributes cattr = new LateralCacheAttributes();
         cattr.setCacheName( cacheName );
-        LateralCacheNoWaitFacade facade = new LateralCacheNoWaitFacade( noWaits, cattr );
+        LateralCacheNoWaitFacade<String, String> facade = new LateralCacheNoWaitFacade<String, String>( noWaits, cattr );
         listener.addNoWaitFacade( cacheName, facade );
 
         // DO WORK
@@ -237,12 +237,12 @@ public class LateralTCPDiscoveryListener
         lca.setTcpServer( service.getServiceAddress() + ":" + service.getServicePort() );
         LateralTCPCacheManager lcm = LateralTCPCacheManager.getInstance( lca, cacheMgr, cacheEventLogger,
                                                                          elementSerializer );
-        LateralCacheNoWait noWait = (LateralCacheNoWait) lcm.getCache( cacheName );
+        LateralCacheNoWait<String, String> noWait = (LateralCacheNoWait) lcm.getCache( cacheName );
 
-        LateralCacheNoWait[] noWaits = new LateralCacheNoWait[0];
+        LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
         ILateralCacheAttributes cattr = new LateralCacheAttributes();
         cattr.setCacheName( cacheName );
-        LateralCacheNoWaitFacade facade = new LateralCacheNoWaitFacade( noWaits, cattr );
+        LateralCacheNoWaitFacade<String, String> facade = new LateralCacheNoWaitFacade<String, String>( noWaits, cattr );
         listener.addNoWaitFacade( cacheName, facade );
         listener.addDiscoveredService( service );
 

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheClientTester.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheClientTester.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheClientTester.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheClientTester.java Fri May 11 19:12:35 2012
@@ -128,7 +128,6 @@ public class RemoteCacheClientTester
             // incoming calls,
             // using an anonymous port.
             UnicastRemoteObject.exportObject( this );
-            ee = null;
         }
         catch ( ExportException e )
         {

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheListenerUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheListenerUnitTest.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheListenerUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheListenerUnitTest.java Fri May 11 19:12:35 2012
@@ -54,7 +54,7 @@ public class RemoteCacheListenerUnitTest
         // SETUP
         IRemoteCacheAttributes irca = new RemoteCacheAttributes();
         irca.setRemoveUponRemotePut( false );
-        ICompositeCacheManager cacheMgr = new MockCompositeCacheManager();
+        ICompositeCacheManager cacheMgr = new MockCompositeCacheManager<String, String>();
         RemoteCacheListener<String, String> listener = new RemoteCacheListener<String, String>( irca, cacheMgr );
 
         String cacheName = "testName";
@@ -97,7 +97,7 @@ public class RemoteCacheListenerUnitTest
         // SETUP
         IRemoteCacheAttributes irca = new RemoteCacheAttributes();
         irca.setRemoveUponRemotePut( true );
-        ICompositeCacheManager cacheMgr = new MockCompositeCacheManager();
+        ICompositeCacheManager cacheMgr = new MockCompositeCacheManager<String, String>();
         RemoteCacheListener<String, String> listener = new RemoteCacheListener<String, String>( irca, cacheMgr );
 
         String cacheName = "testName";

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/TestRemoteCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/TestRemoteCache.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/TestRemoteCache.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/TestRemoteCache.java Fri May 11 19:12:35 2012
@@ -101,7 +101,7 @@ public class TestRemoteCache
 
         Thread.sleep( 100 );
 
-        ICompositeCacheManager cacheMgr = new MockCompositeCacheManager();
+        ICompositeCacheManager cacheMgr = new MockCompositeCacheManager<String, String>();
 
         RemoteCacheAttributes rca = new RemoteCacheAttributes();
         rca.setRemoteHost( "localhost" );

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheServiceUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheServiceUnitTest.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheServiceUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheServiceUnitTest.java Fri May 11 19:12:35 2012
@@ -40,7 +40,7 @@ public class RemoteHttpCacheServiceUnitT
         throws Exception
     {
         // SETUP
-        MockCompositeCacheManager manager = new  MockCompositeCacheManager();
+        MockCompositeCacheManager<String, String> manager = new MockCompositeCacheManager<String, String>();
         MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger();
 
         RemoteHttpCacheServerAttributes rcsa = new RemoteHttpCacheServerAttributes();
@@ -69,7 +69,7 @@ public class RemoteHttpCacheServiceUnitT
         throws Exception
     {
         // SETUP
-        MockCompositeCacheManager manager = new  MockCompositeCacheManager();
+        MockCompositeCacheManager<String, String> manager = new MockCompositeCacheManager<String, String>();
         MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger();
 
         RemoteHttpCacheServerAttributes rcsa = new RemoteHttpCacheServerAttributes();
@@ -93,7 +93,7 @@ public class RemoteHttpCacheServiceUnitT
         throws Exception
     {
         // SETUP
-        MockCompositeCacheManager manager = new  MockCompositeCacheManager();
+        MockCompositeCacheManager<String, String> manager = new MockCompositeCacheManager<String, String>();
         MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger();
 
         RemoteHttpCacheServerAttributes rcsa = new RemoteHttpCacheServerAttributes();
@@ -117,7 +117,7 @@ public class RemoteHttpCacheServiceUnitT
         throws Exception
     {
         // SETUP
-        MockCompositeCacheManager manager = new  MockCompositeCacheManager();
+        MockCompositeCacheManager<String, String> manager = new MockCompositeCacheManager<String, String>();
         MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger();
 
         RemoteHttpCacheServerAttributes rcsa = new RemoteHttpCacheServerAttributes();
@@ -141,7 +141,7 @@ public class RemoteHttpCacheServiceUnitT
         throws Exception
     {
         // SETUP
-        MockCompositeCacheManager manager = new  MockCompositeCacheManager();
+        MockCompositeCacheManager<String, String> manager = new MockCompositeCacheManager<String, String>();
         MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger();
 
         RemoteHttpCacheServerAttributes rcsa = new RemoteHttpCacheServerAttributes();
@@ -165,7 +165,7 @@ public class RemoteHttpCacheServiceUnitT
         throws Exception
     {
         // SETUP
-        MockCompositeCacheManager manager = new  MockCompositeCacheManager();
+        MockCompositeCacheManager<String, String> manager = new MockCompositeCacheManager<String, String>();
         MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger();
 
         RemoteHttpCacheServerAttributes rcsa = new RemoteHttpCacheServerAttributes();

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheSeviceFactoryUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheSeviceFactoryUnitTest.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheSeviceFactoryUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheSeviceFactoryUnitTest.java Fri May 11 19:12:35 2012
@@ -36,27 +36,27 @@ public class RemoteHttpCacheSeviceFactor
     public void testCreateRemoteHttpCacheService_WithLogger()
     {
         // SETUP
-        MockCompositeCacheManager manager = new  MockCompositeCacheManager();
+        MockCompositeCacheManager<String, String> manager = new  MockCompositeCacheManager<String, String>();
         String className = MockCacheEventLogger.class.getName();
 
         Properties props = new Properties();
         props.put( IRemoteHttpCacheConstants.HTTP_CACHE_SERVER_PREFIX
             + AuxiliaryCacheConfigurator.CACHE_EVENT_LOGGER_PREFIX, className );
-        
+
         boolean allowClusterGet = false;
         props.put( IRemoteHttpCacheConstants.HTTP_CACHE_SERVER_ATTRIBUTES_PROPERTY_PREFIX + ".allowClusterGet", String
             .valueOf( allowClusterGet ) );
-        
+
         manager.setConfigurationProperties( props );
 
         // DO WORK
-        RemoteHttpCacheService result = RemoteHttpCacheSeviceFactory
+        RemoteHttpCacheService<String, String> result = RemoteHttpCacheSeviceFactory
             .createRemoteHttpCacheService( manager );
 
         // VERIFY
         assertNotNull( "Should have a service.", result );
     }
-    
+
     /** verify that we get the CacheEventLogger value */
     public void testConfigureCacheEventLogger_Present()
     {

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java Fri May 11 19:12:35 2012
@@ -72,7 +72,7 @@ public class BasicRemoteCacheClientServe
         throws Exception
     {
         // SETUP
-        MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager();
+        MockCompositeCacheManager<String, String> compositeCacheManager = new MockCompositeCacheManager<String, String>();
 
         RemoteCacheAttributes attributes = new RemoteCacheAttributes();
         attributes.setRemoteHost( "localhost" );
@@ -109,7 +109,7 @@ public class BasicRemoteCacheClientServe
         throws Exception
     {
         // SETUP
-        MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager();
+        MockCompositeCacheManager<String, String> compositeCacheManager = new MockCompositeCacheManager<String, String>();
 
         RemoteCacheAttributes attributes = new RemoteCacheAttributes();
         attributes.setRemoteHost( "localhost" );
@@ -155,7 +155,7 @@ public class BasicRemoteCacheClientServe
         throws Exception
     {
         // SETUP
-        MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager();
+        MockCompositeCacheManager<String, String> compositeCacheManager = new MockCompositeCacheManager<String, String>();
 
         RemoteCacheAttributes attributes = new RemoteCacheAttributes();
         attributes.setRemoteHost( "localhost" );
@@ -197,7 +197,7 @@ public class BasicRemoteCacheClientServe
         throws Exception
     {
         // SETUP
-        MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager();
+        MockCompositeCacheManager<String, String> compositeCacheManager = new MockCompositeCacheManager<String, String>();
 
         RemoteCacheAttributes attributes = new RemoteCacheAttributes();
         attributes.setRemoteHost( "localhost" );

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/access/JCSWorkerUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/access/JCSWorkerUnitTest.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/access/JCSWorkerUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/access/JCSWorkerUnitTest.java Fri May 11 19:12:35 2012
@@ -42,7 +42,7 @@ public class JCSWorkerUnitTest
     public void testSimpleGet()
         throws Exception
     {
-        JCSWorker cachingWorker = new JCSWorker( "example region" );
+        JCSWorker<String, Long> cachingWorker = new JCSWorker<String, Long>( "example region" );
 
         // This is the helper.
         JCSWorkerHelper helper = new AbstractJCSWorkerHelper()
@@ -58,11 +58,11 @@ public class JCSWorkerUnitTest
 
         String key = "abc";
 
-        Long result = (Long) cachingWorker.getResult( key, helper );
+        Long result = cachingWorker.getResult( key, helper );
         assertEquals( "Called the wrong number of times", Long.valueOf( 1 ), result );
 
-        // should get it fromthe cache.
-        Long result2 = (Long) cachingWorker.getResult( key, helper );
+        // should get it from the cache.
+        Long result2 = cachingWorker.getResult( key, helper );
         assertEquals( "Called the wrong number of times", Long.valueOf( 1 ), result2 );
 
     }

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/JCSvsCommonsLRUMapPerformanceTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/JCSvsCommonsLRUMapPerformanceTest.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/JCSvsCommonsLRUMapPerformanceTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/JCSvsCommonsLRUMapPerformanceTest.java Fri May 11 19:12:35 2012
@@ -113,7 +113,7 @@ public class JCSvsCommonsLRUMapPerforman
         try
         {
 
-            Map cache = new LRUMap( tries );
+            Map<String, String> cache = new LRUMap<String, String>( tries );
 
             for ( int j = 0; j < loops; j++ )
             {
@@ -144,7 +144,7 @@ public class JCSvsCommonsLRUMapPerforman
                 // /////////////////////////////////////////////////////////////
                 cache2Name = "Commons  ";
                 // or LRUMapJCS
-                Map cache2 = new org.apache.commons.collections.map.LRUMap( tries );
+                Map<String, String> cache2 = new org.apache.commons.collections.map.LRUMap( tries );
                 // cache2Name = "Hashtable";
                 // Hashtable cache2 = new Hashtable();
                 start = System.currentTimeMillis();

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapConcurrentTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapConcurrentTest.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapConcurrentTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapConcurrentTest.java Fri May 11 19:12:35 2012
@@ -63,7 +63,7 @@ public class LRUMapConcurrentTest
         TestSuite suite = new TestSuite( LRUMapConcurrentTest.class );
 
         // run concurrent tests
-        final LRUMap map = new LRUMap( 2000 );
+        final LRUMap<String, String> map = new LRUMap<String, String>( 2000 );
         suite.addTest( new LRUMapConcurrentTest( "conc1" )
         {
             @Override
@@ -94,7 +94,7 @@ public class LRUMapConcurrentTest
 
         // run more concurrent tests
         final int max2 = 20000;
-        final LRUMap map2 = new LRUMap( max2 );
+        final LRUMap<String, String> map2 = new LRUMap<String, String>( max2 );
         suite.addTest( new LRUMapConcurrentTest( "concB1" )
         {
             @Override
@@ -124,7 +124,7 @@ public class LRUMapConcurrentTest
     public void testSimpleLoad()
         throws Exception
     {
-        LRUMap map = new LRUMap( items );
+        LRUMap<String, String> map = new LRUMap<String, String>( items );
 
         for ( int i = 0; i < items; i++ )
         {
@@ -133,7 +133,7 @@ public class LRUMapConcurrentTest
 
         for ( int i = items - 1; i >= 0; i-- )
         {
-            String res = (String) map.get( i + ":key" );
+            String res = map.get( i + ":key" );
             assertNotNull( "[" + i + ":key] should not be null", res );
         }
 
@@ -151,7 +151,7 @@ public class LRUMapConcurrentTest
         throws Exception
     {
         int total = 10;
-        LRUMap map = new LRUMap( total );
+        LRUMap<String, String> map = new LRUMap<String, String>( total );
         map.setChunkSize( 1 );
 
         // put the max in
@@ -160,7 +160,7 @@ public class LRUMapConcurrentTest
             map.put( i + ":key", "data" + i );
         }
 
-        Iterator it = map.entrySet().iterator();
+        Iterator<?> it = map.entrySet().iterator();
         while ( it.hasNext() )
         {
             System.out.println( it.next() );
@@ -170,7 +170,7 @@ public class LRUMapConcurrentTest
         // get the max out backwards
         for ( int i = total - 1; i >= 0; i-- )
         {
-            String res = (String) map.get( i + ":key" );
+            String res = map.get( i + ":key" );
             assertNotNull( "[" + i + ":key] should not be null", res );
         }
 
@@ -190,7 +190,7 @@ public class LRUMapConcurrentTest
         throws Exception
     {
         int total = 10000;
-        LRUMap map = new LRUMap( total );
+        LRUMap<String, String> map = new LRUMap<String, String>( total );
         map.setChunkSize( 1 );
 
         // put the max in
@@ -199,7 +199,7 @@ public class LRUMapConcurrentTest
             map.put( i + ":key", "data" + i );
         }
 
-        // get the total number, these shoukld be null
+        // get the total number, these should be null
         for ( int i = total - 1; i >= 0; i-- )
         {
             assertNull( map.get( i + ":key" ) );
@@ -209,7 +209,7 @@ public class LRUMapConcurrentTest
         // get the total to total *2 items out, these should be foufn.
         for ( int i = ( total * 2 ) - 1; i >= total; i-- )
         {
-            String res = (String) map.get( i + ":key" );
+            String res = map.get( i + ":key" );
             assertNotNull( "[" + i + ":key] should not be null", res );
         }
 
@@ -223,7 +223,7 @@ public class LRUMapConcurrentTest
      * @param items
      * @throws Exception
      */
-    public void runConcurrentPutGetTests( LRUMap map, int items )
+    public void runConcurrentPutGetTests( LRUMap<String, String> map, int items )
         throws Exception
     {
         for ( int i = 0; i < items; i++ )
@@ -233,7 +233,7 @@ public class LRUMapConcurrentTest
 
         for ( int i = items - 1; i >= 0; i-- )
         {
-            String res = (String) map.get( i + ":key" );
+            String res = map.get( i + ":key" );
             assertNotNull( "[" + i + ":key] should not be null", res );
         }
     }
@@ -246,7 +246,7 @@ public class LRUMapConcurrentTest
      * @param end
      * @throws Exception
      */
-    public void runConcurrentRangeTests( LRUMap map, int start, int end )
+    public void runConcurrentRangeTests( LRUMap<String, String> map, int start, int end )
         throws Exception
     {
         for ( int i = start; i < end; i++ )
@@ -256,7 +256,7 @@ public class LRUMapConcurrentTest
 
         for ( int i = end - 1; i >= start; i-- )
         {
-            String res = (String) map.get( i + ":key" );
+            String res = map.get( i + ":key" );
             assertNotNull( "[" + i + ":key] should not be null", res );
         }
 

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapConcurrentUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapConcurrentUnitTest.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapConcurrentUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapConcurrentUnitTest.java Fri May 11 19:12:35 2012
@@ -57,7 +57,7 @@ public class LRUMapConcurrentUnitTest
         TestSuite suite = new TestSuite( LRUMapConcurrentUnitTest.class );
 
         // run concurrent tests
-        final LRUMap map = new LRUMap( 2000 );
+        final LRUMap<String, String> map = new LRUMap<String, String>( 2000 );
         suite.addTest( new LRUMapConcurrentUnitTest( "conc1" )
         {
             @Override
@@ -88,7 +88,7 @@ public class LRUMapConcurrentUnitTest
 
         // run more concurrent tests
         final int max2 = 20000;
-        final LRUMap map2 = new LRUMap( max2 );
+        final LRUMap<String, String> map2 = new LRUMap<String, String>( max2 );
         suite.addTest( new LRUMapConcurrentUnitTest( "concB1" )
         {
             @Override
@@ -120,7 +120,7 @@ public class LRUMapConcurrentUnitTest
     public void testSimpleLoad()
         throws Exception
     {
-        LRUMap map = new LRUMap( items );
+        LRUMap<String, String> map = new LRUMap<String, String>( items );
 
         for ( int i = 0; i < items; i++ )
         {
@@ -129,7 +129,7 @@ public class LRUMapConcurrentUnitTest
 
         for ( int i = items - 1; i >= 0; i-- )
         {
-            String res = (String) map.get( i + ":key" );
+            String res = map.get( i + ":key" );
             assertNotNull( "[" + i + ":key] should not be null", res );
         }
 
@@ -140,7 +140,7 @@ public class LRUMapConcurrentUnitTest
     }
 
     /**
-     * Just make sure that the LRU functions int he most simple case.
+     * Just make sure that the LRU functions in he most simple case.
      *
      * @exception Exception
      *                Description of the Exception
@@ -149,7 +149,7 @@ public class LRUMapConcurrentUnitTest
         throws Exception
     {
         int total = 10;
-        LRUMap map = new LRUMap( total );
+        LRUMap<String, String> map = new LRUMap<String, String>( total );
         map.setChunkSize( 1 );
 
         // put the max in
@@ -158,7 +158,7 @@ public class LRUMapConcurrentUnitTest
             map.put( i + ":key", "data" + i );
         }
 
-        Iterator it = map.entrySet().iterator();
+        Iterator<?> it = map.entrySet().iterator();
         while ( it.hasNext() )
         {
             System.out.println( it.next() );
@@ -168,7 +168,7 @@ public class LRUMapConcurrentUnitTest
         // get the max out backwards
         for ( int i = total - 1; i >= 0; i-- )
         {
-            String res = (String) map.get( i + ":key" );
+            String res = map.get( i + ":key" );
             assertNotNull( "[" + i + ":key] should not be null", res );
         }
 
@@ -188,7 +188,7 @@ public class LRUMapConcurrentUnitTest
         throws Exception
     {
         int total = 10000;
-        LRUMap map = new LRUMap( total );
+        LRUMap<String, String> map = new LRUMap<String, String>( total );
         map.setChunkSize( 1 );
 
         // put the max in
@@ -197,17 +197,17 @@ public class LRUMapConcurrentUnitTest
             map.put( i + ":key", "data" + i );
         }
 
-        // get the total number, these shoukld be null
+        // get the total number, these should be null
         for ( int i = total - 1; i >= 0; i-- )
         {
             assertNull( map.get( i + ":key" ) );
 
         }
 
-        // get the total to total *2 items out, these should be foufn.
+        // get the total to total *2 items out, these should be found.
         for ( int i = ( total * 2 ) - 1; i >= total; i-- )
         {
-            String res = (String) map.get( i + ":key" );
+            String res = map.get( i + ":key" );
             assertNotNull( "[" + i + ":key] should not be null", res );
         }
 
@@ -222,7 +222,7 @@ public class LRUMapConcurrentUnitTest
      * @param items
      * @throws Exception
      */
-    public void runConcurrentPutGetTests( LRUMap map, int items )
+    public void runConcurrentPutGetTests( LRUMap<String, String> map, int items )
         throws Exception
     {
         for ( int i = 0; i < items; i++ )
@@ -232,7 +232,7 @@ public class LRUMapConcurrentUnitTest
 
         for ( int i = items - 1; i >= 0; i-- )
         {
-            String res = (String) map.get( i + ":key" );
+            String res = map.get( i + ":key" );
             assertNotNull( "[" + i + ":key] should not be null", res );
         }
     }
@@ -246,7 +246,7 @@ public class LRUMapConcurrentUnitTest
      * @param end
      * @throws Exception
      */
-    public void runConcurrentRangeTests( LRUMap map, int start, int end )
+    public void runConcurrentRangeTests( LRUMap<String, String> map, int start, int end )
         throws Exception
     {
         for ( int i = start; i < end; i++ )
@@ -256,7 +256,7 @@ public class LRUMapConcurrentUnitTest
 
         for ( int i = end - 1; i >= start; i-- )
         {
-            String res = (String) map.get( i + ":key" );
+            String res = map.get( i + ":key" );
             assertNotNull( "[" + i + ":key] should not be null", res );
         }
 

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapPerformanceTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapPerformanceTest.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapPerformanceTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapPerformanceTest.java Fri May 11 19:12:35 2012
@@ -26,7 +26,6 @@ import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
 import org.apache.jcs.JCSvsHashtablePerformanceTest;
-import org.apache.jcs.utils.struct.LRUMap;
 
 /**
  * This ensures that the jcs version of the LRU map is as fast as the commons
@@ -108,7 +107,7 @@ public class LRUMapPerformanceTest
 
         try
         {
-            Map cache = new LRUMap( tries );
+            Map<String, String> cache = new LRUMap<String, String>( tries );
 
             for ( int j = 0; j < loops; j++ )
             {
@@ -138,7 +137,7 @@ public class LRUMapPerformanceTest
                 ///////////////////////////////////////////////////////////////
                 cache2Name = "LRUMapJCS (commons)";
                 //or LRUMapJCS
-                Map cache2 = new org.apache.commons.collections.map.LRUMap( tries );
+                Map<String, String> cache2 = new org.apache.commons.collections.map.LRUMap( tries );
                 //cache2Name = "Hashtable";
                 //Hashtable cache2 = new Hashtable();
                 start = System.currentTimeMillis();

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapUnitTest.java?rev=1337332&r1=1337331&r2=1337332&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/struct/LRUMapUnitTest.java Fri May 11 19:12:35 2012
@@ -20,10 +20,8 @@ package org.apache.jcs.utils.struct;
  */
 
 import java.util.Map;
-import java.util.Set;
 import java.util.Map.Entry;
-
-import org.apache.jcs.utils.struct.LRUMap;
+import java.util.Set;
 
 import junit.framework.TestCase;
 
@@ -44,7 +42,7 @@ public class LRUMapUnitTest
     public void testPutWithSizeLimit()
     {
         int size = 10;
-        Map cache = new LRUMap( size );
+        Map<String, String> cache = new LRUMap<String, String>( size );
 
         for ( int i = 0; i < size; i++ )
         {
@@ -53,7 +51,7 @@ public class LRUMapUnitTest
 
         for ( int i = 0; i < size; i++ )
         {
-            String data = (String)cache.get( "key:" + i );
+            String data = cache.get( "key:" + i );
             assertEquals( "Data is wrong.", "data:" + i, data );
         }
     }
@@ -65,7 +63,7 @@ public class LRUMapUnitTest
     public void testPutWithNoSizeLimit()
     {
         int size = 10;
-        Map cache = new LRUMap( );
+        Map<String, String> cache = new LRUMap<String, String>( );
 
         for ( int i = 0; i < size; i++ )
         {
@@ -74,7 +72,7 @@ public class LRUMapUnitTest
 
         for ( int i = 0; i < size; i++ )
         {
-            String data = (String)cache.get( "key:" + i );
+            String data = cache.get( "key:" + i );
             assertEquals( "Data is wrong.", "data:" + i, data );
         }
     }
@@ -86,10 +84,10 @@ public class LRUMapUnitTest
     public void testPutAndRemove()
     {
         int size = 10;
-        Map cache = new LRUMap( size );
+        Map<String, String> cache = new LRUMap<String, String>( size );
 
         cache.put( "key:" + 1, "data:" + 1 );
-        String data = (String)cache.remove( "key:" + 1 );
+        String data = cache.remove( "key:" + 1 );
         assertEquals( "Data is wrong.", "data:" + 1, data );
     }
 
@@ -100,7 +98,7 @@ public class LRUMapUnitTest
     public void testRemoveEmpty()
     {
         int size = 10;
-        Map cache = new LRUMap( size );
+        Map<String, String> cache = new LRUMap<String, String>( size );
 
         Object returned = cache.remove( "key:" + 1 );
         assertNull( "Shouldn't hvae anything.", returned );
@@ -114,21 +112,19 @@ public class LRUMapUnitTest
     public void testGetEntrySet()
     {
         int size = 10;
-        Map cache = new LRUMap( size );
+        Map<String, String> cache = new LRUMap<String, String>( size );
 
         for ( int i = 0; i < size; i++ )
         {
             cache.put( "key:" + i, "data:" + i );
         }
 
-        Set entries = cache.entrySet();
+        Set<Entry<String, String>> entries = cache.entrySet();
         assertEquals( "Set contains the wrong number of items.", size, entries.size() );
 
         // check minimal correctness
-        Object[] entryArray = entries.toArray();
-        for ( int i = 0; i < size; i++ )
+        for (Entry<String, String> data : entries)
         {
-            Entry data = (Entry)entryArray[i];
             assertTrue( "Data is wrong.", data.getValue().toString().indexOf( "data:") != -1  );
         }
     }



Mime
View raw message