You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sebb <se...@gmail.com> on 2012/08/06 00:09:11 UTC

Re: svn commit: r1369332 - in /commons/proper/jcs/trunk/src/test/org/apache/jcs: ./ auxiliary/disk/block/ auxiliary/disk/file/ auxiliary/disk/indexed/ auxiliary/disk/jdbc/ auxiliary/disk/jdbc/mysql/ auxiliary/lateral/ auxiliary/lateral/socket/tcp/ au

On 4 August 2012 15:23,  <tv...@apache.org> wrote:
> Author: tv
> Date: Sat Aug  4 14:23:36 2012
> New Revision: 1369332
>
> URL: http://svn.apache.org/viewvc?rev=1369332&view=rev
> Log:
> - Fixed lots of warnings and FindBugs issues
> - Introduced carefully crafted @SuppressWarnings annotations

They may be carefully crafted, but without comments it's impossible to tell ...

Please ensure that each annotation is commented with the reason why it
is safe to ignore.

> Modified:
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/JCSCacheElementRetrievalUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheKeyStoreUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskElementDescriptorUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/file/FileDiskCacheFactoryUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/indexed/DiskTestObjectUtil.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/HsqlSetupTableUtil.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheManagerUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/LateralCacheNoWaitFacadeUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/TestTCPLateralUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheClient.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheService.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheClientTester.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheListenerUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/TestRemoteCache.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/ZombieRemoteCacheServiceUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/client/MockRemoteCacheDispatcher.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheDispatcherUniTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheManagerUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheServiceUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheSeviceFactoryUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/server/RemoteCacheServerFactoryUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/server/RemoteCacheServerStartupUtil.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/CompositeCacheDiskUsageUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/CompositeCacheUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/MockCompositeCacheManager.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/utils/date/ThreadSafeSimpleDateFormatUnitTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/utils/struct/JCSvsCommonsLRUMapPerformanceTest.java
>     commons/proper/jcs/trunk/src/test/org/apache/jcs/utils/struct/LRUMapPerformanceTest.java
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/JCSCacheElementRetrievalUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/JCSCacheElementRetrievalUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/JCSCacheElementRetrievalUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/JCSCacheElementRetrievalUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -19,10 +19,10 @@ package org.apache.jcs;
>   * under the License.
>   */
>
> -import org.apache.jcs.engine.behavior.ICacheElement;
> -
>  import junit.framework.TestCase;
>
> +import org.apache.jcs.engine.behavior.ICacheElement;
> +
>  /**
>   * @author Aaron Smuts
>   *
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheKeyStoreUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheKeyStoreUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheKeyStoreUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheKeyStoreUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -92,9 +92,7 @@ public class BlockDiskCacheKeyStoreUnitT
>          attributes.setMaxKeySize( maxKeys );
>          attributes.setBlockSizeBytes( bytesPerBlock );
>
> -        BlockDiskCache<String, String> blockDiskCache = new BlockDiskCache<String, String>( attributes );
> -
> -        BlockDiskKeyStore<String> keyStore = new BlockDiskKeyStore<String>( attributes, blockDiskCache );
> +        BlockDiskKeyStore<String> keyStore = new BlockDiskKeyStore<String>( attributes, null );
>
>          // DO WORK
>          int numElements = 1000;
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskElementDescriptorUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskElementDescriptorUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskElementDescriptorUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskElementDescriptorUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -44,6 +44,7 @@ public class BlockDiskElementDescriptorU
>          System.out.println( "Before: " + memoryBefore );
>
>          int numElements = 25000;
> +        @SuppressWarnings("unchecked")
>          BlockDiskElementDescriptor<Integer>[] elements = new BlockDiskElementDescriptor[numElements];
>
>          long memoryStart = measureMemoryUse();
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/file/FileDiskCacheFactoryUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/file/FileDiskCacheFactoryUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/file/FileDiskCacheFactoryUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/file/FileDiskCacheFactoryUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -22,7 +22,7 @@ public class FileDiskCacheFactoryUnitTes
>          cattr.setCacheName( cacheName );
>          cattr.setDiskPath( "target/test-sandbox/FileDiskCacheFactoryUnitTest" );
>
> -        ICompositeCacheManager cacheMgr = new MockCompositeCacheManager<String, String>();
> +        ICompositeCacheManager cacheMgr = new MockCompositeCacheManager();
>          ICacheEventLogger cacheEventLogger = new MockCacheEventLogger();
>          IElementSerializer elementSerializer = new MockElementSerializer();
>
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/indexed/DiskTestObjectUtil.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/indexed/DiskTestObjectUtil.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/indexed/DiskTestObjectUtil.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/indexed/DiskTestObjectUtil.java Sat Aug  4 14:23:36 2012
> @@ -102,6 +102,7 @@ public class DiskTestObjectUtil
>       */
>      public static ICacheElement<Integer, DiskTestObject>[] createCacheElementsWithTestObjects( int numToCreate, int bytes, String cacheName )
>      {
> +        @SuppressWarnings("unchecked")
>          ICacheElement<Integer, DiskTestObject>[] elements = new ICacheElement[numToCreate];
>          for ( int i = 0; i < numToCreate; i++ )
>          {
> @@ -124,6 +125,7 @@ public class DiskTestObjectUtil
>       */
>      public static ICacheElement<Integer, DiskTestObject>[] createCacheElementsWithTestObjectsOfVariableSizes( int numToCreate, String cacheName )
>      {
> +        @SuppressWarnings("unchecked")
>          ICacheElement<Integer, DiskTestObject>[] elements = new ICacheElement[numToCreate];
>          Random random = new Random( 89 );
>          for ( int i = 0; i < numToCreate; i++ )
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/HsqlSetupTableUtil.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/HsqlSetupTableUtil.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/HsqlSetupTableUtil.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/HsqlSetupTableUtil.java Sat Aug  4 14:23:36 2012
> @@ -12,8 +12,10 @@ public class HsqlSetupTableUtil
>       * <p>
>       * @param cConn
>       * @param tableName
> +     *
> +     * @throws SQLException if database problems occur
>       */
> -    public static void setupTABLE( Connection cConn, String tableName )
> +    public static void setupTABLE( Connection cConn, String tableName ) throws SQLException
>      {
>          boolean newT = true;
>
> @@ -31,20 +33,11 @@ public class HsqlSetupTableUtil
>          createSql.append( "PRIMARY KEY (CACHE_KEY, REGION) " );
>          createSql.append( ");" );
>
> -        Statement sStatement = null;
> -        try
> -        {
> -            sStatement = cConn.createStatement();
> -        }
> -        catch ( SQLException e )
> -        {
> -            e.printStackTrace();
> -        }
> +        Statement sStatement = cConn.createStatement();
>
>          try
>          {
>              sStatement.executeQuery( createSql.toString() );
> -            sStatement.close();
>          }
>          catch ( SQLException e )
>          {
> @@ -54,11 +47,13 @@ public class HsqlSetupTableUtil
>              }
>              else
>              {
> -                // TODO figure out if it exists prior to trying to create it.
> -                // log.error( "Problem creating table.", e );
> -                e.printStackTrace();
> +                throw e;
>              }
>          }
> +        finally
> +        {
> +            sStatement.close();
> +        }
>
>          String setupData[] = { "create index iKEY on JCS_STORE2 (CACHE_KEY, REGION)" };
>
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -111,8 +111,10 @@ public class JDBCDiskCacheRemovalUnitTes
>       * SETUP TABLE FOR CACHE
>       * <p>
>       * @param cConn
> +     *
> +     * @throws SQLException if database problems occur
>       */
> -    private void setupTABLE( Connection cConn )
> +    private void setupTABLE( Connection cConn ) throws SQLException
>      {
>          boolean newT = true;
>
> @@ -130,34 +132,28 @@ public class JDBCDiskCacheRemovalUnitTes
>          createSql.append( "PRIMARY KEY (CACHE_KEY, REGION) " );
>          createSql.append( ");" );
>
> -        Statement sStatement = null;
> -        try
> -        {
> -            sStatement = cConn.createStatement();
> -        }
> -        catch ( SQLException e )
> -        {
> -            e.printStackTrace();
> -        }
> +        Statement sStatement = cConn.createStatement();
>
>          try
>          {
>              sStatement.executeQuery( createSql.toString() );
> -            sStatement.close();
>          }
>          catch ( SQLException e )
>          {
> +            // FIXME: This is unreliable
>              if ( e.toString().indexOf( "already exists" ) != -1 )
>              {
>                  newT = false;
>              }
>              else
>              {
> -                // TODO figure out if it exists prior to trying to create it.
> -                // log.error( "Problem creating table.", e );
> -                e.printStackTrace();
> +                throw e;
>              }
>          }
> +        finally
> +        {
> +            sStatement.close();
> +        }
>
>          String setupData[] = { "create index iKEY on " + databaseName + " (CACHE_KEY, REGION)" };
>
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -216,8 +216,10 @@ public class JDBCDiskCacheShrinkUnitTest
>      /**
>       * SETUP TABLE FOR CACHE
>       * @param cConn
> +     *
> +     * @throws SQLException if database problems occur
>       */
> -    void setupTABLE( Connection cConn )
> +    void setupTABLE( Connection cConn ) throws SQLException
>      {
>          boolean newT = true;
>
> @@ -235,20 +237,11 @@ public class JDBCDiskCacheShrinkUnitTest
>          createSql.append( "PRIMARY KEY (CACHE_KEY, REGION) " );
>          createSql.append( ");" );
>
> -        Statement sStatement = null;
> -        try
> -        {
> -            sStatement = cConn.createStatement();
> -        }
> -        catch ( SQLException e )
> -        {
> -            e.printStackTrace();
> -        }
> +        Statement sStatement = cConn.createStatement();
>
>          try
>          {
>              sStatement.executeQuery( createSql.toString() );
> -            sStatement.close();
>          }
>          catch ( SQLException e )
>          {
> @@ -258,11 +251,13 @@ public class JDBCDiskCacheShrinkUnitTest
>              }
>              else
>              {
> -                // TODO figure out if it exists prior to trying to create it.
> -                // log.error( "Problem creating table.", e );
> -                e.printStackTrace();
> +                throw e;
>              }
>          }
> +        finally
> +        {
> +            sStatement.close();
> +        }
>
>          String setupData[] = { "create index iKEY on JCS_STORE_SHRINK (CACHE_KEY, REGION)" };
>
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -168,7 +168,7 @@ public class JDBCDiskCacheUnitTest
>          cattr.setConnectionPoolName( poolName );
>
>          TableState tableState = new TableState( "JCSTESTTABLE_InitializePoolAccess" );
> -        MockCompositeCacheManager<String, String> compositeCacheManager = new MockCompositeCacheManager<String, String>();
> +        MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager();
>          compositeCacheManager.setConfigurationProperties( props );
>
>          JDBCDiskCache<String, String> diskCache = new JDBCDiskCache<String, String>( cattr, tableState, compositeCacheManager );
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheManagerUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheManagerUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheManagerUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheManagerUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -27,7 +27,7 @@ public class MySQLDiskCacheManagerUnitTe
>                                                                             elementSerializer );
>
>          // DO WORK
> -        MySQLDiskCache<String, String> cache = (MySQLDiskCache) manager.getCache( cacheName );
> +        MySQLDiskCache<String, String> cache = manager.getCache( cacheName );
>
>          // VERIFY
>          assertEquals( "wrong cacheEventLogger", cacheEventLogger, cache.getCacheEventLogger() );
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -53,11 +53,11 @@ public class MySQLDiskCacheUnitTest
>          TableState tableState = new TableState( tableName );
>          tableState.setState( TableState.OPTIMIZATION_RUNNING );
>
> -        MySQLDiskCache cache = new MySQLDiskCache( attributes, tableState, CompositeCacheManager.getUnconfiguredInstance() );
> +        MySQLDiskCache<String, String> cache = new MySQLDiskCache<String, String>( attributes, tableState, CompositeCacheManager.getUnconfiguredInstance() );
>
>          // DO WORK
>          Object result = cache.processGet( "myKey" );
> -
> +
>          // VERIFY
>          assertNull( "The result should be null", result );
>      }
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/LateralCacheNoWaitFacadeUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/LateralCacheNoWaitFacadeUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/LateralCacheNoWaitFacadeUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/LateralCacheNoWaitFacadeUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -16,6 +16,7 @@ public class LateralCacheNoWaitFacadeUni
>      public void testAddThenRemoveNoWait_InList()
>      {
>          // SETUP
> +        @SuppressWarnings("unchecked")
>          LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
>          ILateralCacheAttributes cattr = new LateralCacheAttributes();
>          cattr.setCacheName( "testCache1" );
> @@ -45,6 +46,7 @@ public class LateralCacheNoWaitFacadeUni
>      public void testAddThenRemoveNoWait_InListSize2()
>      {
>          // SETUP
> +        @SuppressWarnings("unchecked")
>          LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
>          ILateralCacheAttributes cattr = new LateralCacheAttributes();
>          cattr.setCacheName( "testCache1" );
> @@ -79,6 +81,7 @@ public class LateralCacheNoWaitFacadeUni
>      public void testAdd_InList()
>      {
>          // SETUP
> +        @SuppressWarnings("unchecked")
>          LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
>          ILateralCacheAttributes cattr = new LateralCacheAttributes();
>          cattr.setCacheName( "testCache1" );
> @@ -103,6 +106,7 @@ public class LateralCacheNoWaitFacadeUni
>      public void testAddThenRemoveNoWait_NotInList()
>      {
>          // SETUP
> +        @SuppressWarnings("unchecked")
>          LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
>          ILateralCacheAttributes cattr = new LateralCacheAttributes();
>          cattr.setCacheName( "testCache1" );
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -51,6 +51,8 @@ public class LateralTCPDiscoveryListener
>      {
>          // SETUP
>          String cacheName = "testAddNoWaitFacade_NotInList";
> +
> +        @SuppressWarnings("unchecked")
>          LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
>          ILateralCacheAttributes cattr = new LateralCacheAttributes();
>          cattr.setCacheName( cacheName );
> @@ -71,6 +73,8 @@ public class LateralTCPDiscoveryListener
>      {
>          // SETUP
>          String cacheName = "testAddNoWaitFacade_FacadeInList";
> +
> +        @SuppressWarnings("unchecked")
>          LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
>          ILateralCacheAttributes cattr = new LateralCacheAttributes();
>          cattr.setCacheName( cacheName );
> @@ -135,6 +139,8 @@ public class LateralTCPDiscoveryListener
>      {
>          // SETUP
>          String cacheName = "testAddNoWaitFacade_FacadeInList";
> +
> +        @SuppressWarnings("unchecked")
>          LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
>          ILateralCacheAttributes cattr = new LateralCacheAttributes();
>          cattr.setCacheName( cacheName );
> @@ -159,6 +165,8 @@ public class LateralTCPDiscoveryListener
>      {
>          // SETUP
>          String cacheName = "testRemoveNoWaitFacade_FacadeInListNoWaitIs";
> +
> +        @SuppressWarnings("unchecked")
>          LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
>          ILateralCacheAttributes cattr = new LateralCacheAttributes();
>          cattr.setCacheName( cacheName );
> @@ -200,8 +208,9 @@ public class LateralTCPDiscoveryListener
>          lca.setTcpServer( service.getServiceAddress() + ":" + service.getServicePort() );
>          LateralTCPCacheManager lcm = LateralTCPCacheManager.getInstance( lca, cacheMgr, cacheEventLogger,
>                                                                           elementSerializer );
> -        LateralCacheNoWait<String, String> noWait = (LateralCacheNoWait) lcm.getCache( cacheName );
> +        LateralCacheNoWait<String, String> noWait = lcm.getCache( cacheName );
>
> +        @SuppressWarnings("unchecked")
>          LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
>          ILateralCacheAttributes cattr = new LateralCacheAttributes();
>          cattr.setCacheName( cacheName );
> @@ -238,8 +247,9 @@ public class LateralTCPDiscoveryListener
>          lca.setTcpServer( service.getServiceAddress() + ":" + service.getServicePort() );
>          LateralTCPCacheManager lcm = LateralTCPCacheManager.getInstance( lca, cacheMgr, cacheEventLogger,
>                                                                           elementSerializer );
> -        LateralCacheNoWait<String, String> noWait = (LateralCacheNoWait) lcm.getCache( cacheName );
> +        LateralCacheNoWait<String, String> noWait = lcm.getCache( cacheName );
>
> +        @SuppressWarnings("unchecked")
>          LateralCacheNoWait<String, String>[] noWaits = new LateralCacheNoWait[0];
>          ILateralCacheAttributes cattr = new LateralCacheAttributes();
>          cattr.setCacheName( cacheName );
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/TestTCPLateralUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/TestTCPLateralUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/TestTCPLateralUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/TestTCPLateralUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -29,6 +29,7 @@ import org.apache.jcs.auxiliary.lateral.
>  import org.apache.jcs.engine.CacheElement;
>  import org.apache.jcs.engine.behavior.ICacheElement;
>  import org.apache.jcs.engine.behavior.ICompositeCacheManager;
> +import org.apache.jcs.engine.control.CompositeCache;
>  import org.apache.jcs.engine.control.CompositeCacheManager;
>  import org.apache.jcs.engine.control.MockCompositeCacheManager;
>  import org.apache.jcs.utils.timing.SleepUtil;
> @@ -72,7 +73,7 @@ public class TestTCPLateralUnitTest
>          ICompositeCacheManager cacheMgr = CompositeCacheManager.getInstance();
>
>          // start the listener
> -        LateralTCPListener<String, String> listener = (LateralTCPListener) LateralTCPListener.getInstance( lac, cacheMgr );
> +        LateralTCPListener<String, String> listener = LateralTCPListener.getInstance( lac, cacheMgr );
>
>          // send to the listener
>          LateralTCPSender lur = new LateralTCPSender( lac );
> @@ -106,7 +107,7 @@ public class TestTCPLateralUnitTest
>          TCPLateralCacheAttributes lattr = new TCPLateralCacheAttributes();
>          lattr.setTcpListenerPort( 1101 );
>          lattr.setTransmissionTypeName( "TCP" );
> -        MockCompositeCacheManager<String, String> cacheMgr = new MockCompositeCacheManager<String, String>();
> +        MockCompositeCacheManager cacheMgr = new MockCompositeCacheManager();
>          System.out.println( "mock cache = " + cacheMgr.getCache( "test" ) );
>
>          LateralTCPListener.getInstance( lattr, cacheMgr );
> @@ -146,8 +147,9 @@ public class TestTCPLateralUnitTest
>          // setup a listener
>          TCPLateralCacheAttributes lattr = new TCPLateralCacheAttributes();
>          lattr.setTcpListenerPort( 1103 );
> -        MockCompositeCacheManager<String, String> cacheMgr = new MockCompositeCacheManager<String, String>();
> -        System.out.println( "mock cache = " + cacheMgr.getCache( "test" ) );
> +        MockCompositeCacheManager cacheMgr = new MockCompositeCacheManager();
> +        CompositeCache<String, String> cache = cacheMgr.getCache( "test" );
> +        System.out.println( "mock cache = " + cache );
>
>          // get the listener started
>          // give it our mock cache manager
> @@ -174,7 +176,7 @@ public class TestTCPLateralUnitTest
>          SleepUtil.sleepAtLeast( 1000 );
>
>          // VERIFY
> -        ICacheElement<String, String> cacheElement = cacheMgr.getCache().get( "key" );
> +        ICacheElement<String, String> cacheElement = cache.get( "key" );
>          System.out.println( "cacheElement = " + cacheElement );
>          assertEquals( "Didn't get the correct object", element2.getVal(), cacheElement.getVal() );
>      }
> @@ -190,8 +192,9 @@ public class TestTCPLateralUnitTest
>          TCPLateralCacheAttributes lattr = new TCPLateralCacheAttributes();
>          lattr.setTcpListenerPort( 1105 );
>          lattr.setTransmissionTypeName( "TCP" );
> -        MockCompositeCacheManager<String, String> cacheMgr = new MockCompositeCacheManager<String, String>();
> -        System.out.println( "mock cache = " + cacheMgr.getCache( "test" ) );
> +        MockCompositeCacheManager cacheMgr = new MockCompositeCacheManager();
> +        CompositeCache<String, String> cache = cacheMgr.getCache( "test" );
> +        System.out.println( "mock cache = " + cache );
>
>          // get the listener started
>          // give it our mock cache manager
> @@ -219,7 +222,7 @@ public class TestTCPLateralUnitTest
>          SleepUtil.sleepAtLeast( 1000 );
>
>          // VERIFY
> -        ICacheElement<String, String> cacheElement = cacheMgr.getCache().get( "key" );
> +        ICacheElement<String, String> cacheElement = cache.get( "key" );
>          System.out.println( "cacheElement = " + cacheElement );
>          assertEquals( "Didn't get the correct object", element2.getVal(), cacheElement.getVal() );
>      }
> @@ -237,8 +240,9 @@ public class TestTCPLateralUnitTest
>          // setup a listener
>          TCPLateralCacheAttributes lattr = new TCPLateralCacheAttributes();
>          lattr.setTcpListenerPort( 1107 );
> -        MockCompositeCacheManager<String, String> cacheMgr = new MockCompositeCacheManager<String, String>();
> -        System.out.println( "mock cache = " + cacheMgr.getCache( "test" ) );
> +        MockCompositeCacheManager cacheMgr = new MockCompositeCacheManager();
> +        CompositeCache<String, String> cache = cacheMgr.getCache( "test" );
> +        System.out.println( "mock cache = " + cache );
>
>          // get the listener started
>          // give it our mock cache manager
> @@ -246,7 +250,7 @@ public class TestTCPLateralUnitTest
>
>          // add the item to the listeners cache
>          ICacheElement<String, String> element = new CacheElement<String, String>( "test", "key", "value1" );
> -        cacheMgr.getCache().update( element );
> +        cache.update( element );
>
>          // setup a service to talk to the listener started above.
>          TCPLateralCacheAttributes lattr2 = new TCPLateralCacheAttributes();
> @@ -280,8 +284,9 @@ public class TestTCPLateralUnitTest
>          // setup a listener
>          TCPLateralCacheAttributes lattr = new TCPLateralCacheAttributes();
>          lattr.setTcpListenerPort( 1108 );
> -        MockCompositeCacheManager<String, Integer> cacheMgr = new MockCompositeCacheManager<String, Integer>();
> -        System.out.println( "mock cache = " + cacheMgr.getCache( "test" ) );
> +        MockCompositeCacheManager cacheMgr = new MockCompositeCacheManager();
> +        CompositeCache<String, Integer> cache = cacheMgr.getCache( "test" );
> +        System.out.println( "mock cache = " + cache );
>
>          // get the listener started
>          // give it our mock cache manager
> @@ -294,7 +299,7 @@ public class TestTCPLateralUnitTest
>          {
>              // add the item to the listeners cache
>              ICacheElement<String, Integer> element = new CacheElement<String, Integer>( "test", keyprefix1 + String.valueOf( i ), Integer.valueOf( i ) );
> -            cacheMgr.getCache().update( element );
> +            cache.update( element );
>          }
>
>          // setup a service to talk to the listener started above.
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheClient.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheClient.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheClient.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheClient.java Sat Aug  4 14:23:36 2012
> @@ -33,9 +33,9 @@ import org.apache.jcs.auxiliary.Abstract
>  import org.apache.jcs.auxiliary.AuxiliaryCacheAttributes;
>  import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheClient;
>  import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheListener;
> -import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheService;
>  import org.apache.jcs.engine.CacheConstants;
>  import org.apache.jcs.engine.behavior.ICacheElement;
> +import org.apache.jcs.engine.behavior.ICacheServiceNonLocal;
>  import org.apache.jcs.engine.stats.behavior.IStats;
>
>  /**
> @@ -70,7 +70,7 @@ public class MockRemoteCacheClient<K ext
>          new HashMap<Set<K>, Map<K,ICacheElement<K,V>>>();
>
>      /** The last service passed to fixCache */
> -    public IRemoteCacheService<K, V> fixed;
> +    public ICacheServiceNonLocal<K, V> fixed;
>
>      /** Attributes. */
>      public RemoteCacheAttributes attributes = new RemoteCacheAttributes();
> @@ -79,11 +79,12 @@ public class MockRemoteCacheClient<K ext
>       * Stores the last argument as fixed.
>       * <p>
>       * (non-Javadoc)
> -     * @see org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheClient#fixCache(org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheService)
> +     * @see org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheClient#fixCache(org.apache.jcs.auxiliary.remote.behavior.ICacheServiceNonLocal)
>       */
> -    public void fixCache( IRemoteCacheService<?, ?> remote )
> +    @SuppressWarnings("unchecked")
> +    public void fixCache( ICacheServiceNonLocal<?, ?> remote )
>      {
> -        fixed = (IRemoteCacheService<K, V>)remote;
> +        fixed = (ICacheServiceNonLocal<K, V>)remote;
>      }
>
>      /**
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheService.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheService.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheService.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheService.java Sat Aug  4 14:23:36 2012
> @@ -28,14 +28,14 @@ import java.util.List;
>  import java.util.Map;
>  import java.util.Set;
>
> -import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheService;
>  import org.apache.jcs.engine.behavior.ICacheElement;
> +import org.apache.jcs.engine.behavior.ICacheServiceNonLocal;
>
>  /**
>   * This is a mock impl of the remote cache service.
>   */
>  public class MockRemoteCacheService<K extends Serializable, V extends Serializable>
> -    implements IRemoteCacheService<K, V>
> +    implements ICacheServiceNonLocal<K, V>
>  {
>      /** The key last passed to get */
>      public Serializable lastGetKey;
> @@ -99,7 +99,7 @@ public class MockRemoteCacheService<K ex
>       * Set the lastRemoveAllCacheName to the cacheName.
>       * <p>
>       * (non-Javadoc)
> -     * @see org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheService#removeAll(java.lang.String,
> +     * @see org.apache.jcs.auxiliary.remote.behavior.ICacheServiceNonLocal#removeAll(java.lang.String,
>       *      long)
>       */
>      public void removeAll( String cacheName, long requesterId )
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheClientTester.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheClientTester.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheClientTester.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheClientTester.java Sat Aug  4 14:23:36 2012
> @@ -113,6 +113,7 @@ public class RemoteCacheClientTester
>       * @exception NotBoundException
>       * @exception IOException
>       */
> +    @SuppressWarnings("unchecked")
>      public RemoteCacheClientTester( String host, int port, int count, boolean write, boolean read, boolean delete )
>          throws MalformedURLException, NotBoundException, IOException
>      {
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheListenerUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheListenerUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheListenerUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheListenerUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -54,7 +54,7 @@ public class RemoteCacheListenerUnitTest
>          // SETUP
>          IRemoteCacheAttributes irca = new RemoteCacheAttributes();
>          irca.setRemoveUponRemotePut( false );
> -        ICompositeCacheManager cacheMgr = new MockCompositeCacheManager<String, String>();
> +        ICompositeCacheManager cacheMgr = new MockCompositeCacheManager();
>          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<String, String>();
> +        ICompositeCacheManager cacheMgr = new MockCompositeCacheManager();
>          RemoteCacheListener<String, String> listener = new RemoteCacheListener<String, String>( irca, cacheMgr );
>
>          String cacheName = "testName";
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -27,6 +27,7 @@ import junit.framework.TestCase;
>  import org.apache.jcs.auxiliary.MockCacheEventLogger;
>  import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheAttributes;
>  import org.apache.jcs.engine.CacheElement;
> +import org.apache.jcs.engine.ZombieCacheServiceNonLocal;
>  import org.apache.jcs.engine.behavior.ICacheElement;
>  import org.apache.jcs.engine.behavior.ICacheElementSerialized;
>  import org.apache.jcs.utils.serialization.SerializationConversionUtil;
> @@ -81,7 +82,7 @@ public class RemoteCacheUnitTest
>      {
>          // SETUP
>          IRemoteCacheAttributes cattr = new RemoteCacheAttributes();
> -        ZombieRemoteCacheService<String, String> zombie = new ZombieRemoteCacheService<String, String>( 10 );
> +        ZombieCacheServiceNonLocal<String, String> zombie = new ZombieCacheServiceNonLocal<String, String>( 10 );
>          MockRemoteCacheService<String, String> service = new MockRemoteCacheService<String, String>();
>          MockRemoteCacheListener<String, String> listener = new MockRemoteCacheListener<String, String>();
>
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/TestRemoteCache.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/TestRemoteCache.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/TestRemoteCache.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/TestRemoteCache.java Sat Aug  4 14:23:36 2012
> @@ -102,7 +102,7 @@ public class TestRemoteCache
>
>          Thread.sleep( 100 );
>
> -        ICompositeCacheManager cacheMgr = new MockCompositeCacheManager<String, String>();
> +        ICompositeCacheManager cacheMgr = new MockCompositeCacheManager();
>
>          RemoteCacheAttributes rca = new RemoteCacheAttributes();
>          rca.setRemoteHost( "localhost" );
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/ZombieRemoteCacheServiceUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/ZombieRemoteCacheServiceUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/ZombieRemoteCacheServiceUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/ZombieRemoteCacheServiceUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -22,6 +22,7 @@ package org.apache.jcs.auxiliary.remote;
>  import junit.framework.TestCase;
>
>  import org.apache.jcs.engine.CacheElement;
> +import org.apache.jcs.engine.ZombieCacheServiceNonLocal;
>  import org.apache.jcs.engine.behavior.ICacheElement;
>
>  /**
> @@ -41,7 +42,7 @@ public class ZombieRemoteCacheServiceUni
>          // SETUP
>          MockRemoteCacheService<String, String> service = new MockRemoteCacheService<String, String>();
>
> -        ZombieRemoteCacheService<String, String> zombie = new ZombieRemoteCacheService<String, String>( 10 );
> +        ZombieCacheServiceNonLocal<String, String> zombie = new ZombieCacheServiceNonLocal<String, String>( 10 );
>
>          String cacheName = "testUpdate";
>
> @@ -65,7 +66,7 @@ public class ZombieRemoteCacheServiceUni
>          // SETUP
>          MockRemoteCacheService<String, String> service = new MockRemoteCacheService<String, String>();
>
> -        ZombieRemoteCacheService<String, String> zombie = new ZombieRemoteCacheService<String, String>( 0 );
> +        ZombieCacheServiceNonLocal<String, String> zombie = new ZombieCacheServiceNonLocal<String, String>( 0 );
>
>          String cacheName = "testUpdate";
>
> @@ -89,7 +90,7 @@ public class ZombieRemoteCacheServiceUni
>          // SETUP
>          MockRemoteCacheService<String, String> service = new MockRemoteCacheService<String, String>();
>
> -        ZombieRemoteCacheService<String, String> zombie = new ZombieRemoteCacheService<String, String>( 10 );
> +        ZombieCacheServiceNonLocal<String, String> zombie = new ZombieCacheServiceNonLocal<String, String>( 10 );
>
>          String cacheName = "testRemoveThenWalk";
>          String key = "myKey";
> @@ -113,7 +114,7 @@ public class ZombieRemoteCacheServiceUni
>          // SETUP
>          MockRemoteCacheService<String, String> service = new MockRemoteCacheService<String, String>();
>
> -        ZombieRemoteCacheService<String, String> zombie = new ZombieRemoteCacheService<String, String>( 10 );
> +        ZombieCacheServiceNonLocal<String, String> zombie = new ZombieCacheServiceNonLocal<String, String>( 10 );
>
>          String cacheName = "testRemoveThenWalk";
>
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/client/MockRemoteCacheDispatcher.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/client/MockRemoteCacheDispatcher.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/client/MockRemoteCacheDispatcher.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/client/MockRemoteCacheDispatcher.java Sat Aug  4 14:23:36 2012
> @@ -20,6 +20,7 @@ package org.apache.jcs.auxiliary.remote.
>   */
>
>  import java.io.IOException;
> +import java.io.Serializable;
>
>  import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheDispatcher;
>  import org.apache.jcs.auxiliary.remote.value.RemoteCacheRequest;
> @@ -30,20 +31,23 @@ public class MockRemoteCacheDispatcher
>      implements IRemoteCacheDispatcher
>  {
>      /** The last request passes to dispatch */
> -    public RemoteCacheRequest lastRemoteCacheRequest;
> -
> +    public RemoteCacheRequest<?, ?> lastRemoteCacheRequest;
> +
>      /** The response setup */
> -    public RemoteCacheResponse setupRemoteCacheResponse;
> -
> -    /** Records the last and returns setupRemoteCacheResponse.
> +    public RemoteCacheResponse<?, ?> setupRemoteCacheResponse;
> +
> +    /** Records the last and returns setupRemoteCacheResponse.
>       * <p>
> -     * @param remoteCacheRequest
> +     * @param remoteCacheRequest
>       * @return RemoteCacheResponse
> -     * @throws IOException */
> -    public RemoteCacheResponse dispatchRequest( RemoteCacheRequest remoteCacheRequest )
> +     * @throws IOException
> +     */
> +    @SuppressWarnings("unchecked")
> +    public <K extends Serializable, V extends Serializable, KK extends Serializable, VV extends Serializable>
> +        RemoteCacheResponse<K, V> dispatchRequest( RemoteCacheRequest<KK, VV> remoteCacheRequest )
>          throws IOException
>      {
>          this.lastRemoteCacheRequest = remoteCacheRequest;
> -        return setupRemoteCacheResponse;
> +        return (RemoteCacheResponse<K, V>)setupRemoteCacheResponse;
>      }
>  }
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheDispatcherUniTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheDispatcherUniTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheDispatcherUniTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheDispatcherUniTest.java Sat Aug  4 14:23:36 2012
> @@ -17,7 +17,7 @@ public class RemoteHttpCacheDispatcherUn
>          RemoteHttpCacheAttributes remoteHttpCacheAttributes = new RemoteHttpCacheAttributes();
>          RemoteHttpCacheDispatcher dispatcher = new RemoteHttpCacheDispatcher( remoteHttpCacheAttributes );
>
> -        RemoteCacheRequest remoteCacheRequest = new RemoteCacheRequest();
> +        RemoteCacheRequest<String, String> remoteCacheRequest = new RemoteCacheRequest<String, String>();
>          remoteCacheRequest.setRequestType( RemoteCacheRequest.REQUEST_TYPE_REMOVE_ALL );
>          String cacheName = "myCache";
>          remoteCacheRequest.setCacheName( cacheName );
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheManagerUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheManagerUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheManagerUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheManagerUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -52,7 +52,7 @@ public class RemoteHttpCacheManagerUnitT
>          // VEIFY
>          assertNotNull( "Should have a cache.", result );
>          assertTrue( "Wrong default.", result instanceof RemoteHttpCacheClient );
> -        assertTrue( "Should be initialized", ((RemoteHttpCacheClient)result).isInitialized() );
> +        assertTrue( "Should be initialized", ((RemoteHttpCacheClient<String, String>)result).isInitialized() );
>      }
>
>      /** Verify that we get the default. */
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheServiceUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheServiceUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheServiceUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheServiceUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -40,7 +40,7 @@ public class RemoteHttpCacheServiceUnitT
>          throws Exception
>      {
>          // SETUP
> -        MockCompositeCacheManager<String, String> manager = new MockCompositeCacheManager<String, String>();
> +        MockCompositeCacheManager manager = new MockCompositeCacheManager();
>          MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger();
>
>          RemoteHttpCacheServerAttributes rcsa = new RemoteHttpCacheServerAttributes();
> @@ -69,7 +69,7 @@ public class RemoteHttpCacheServiceUnitT
>          throws Exception
>      {
>          // SETUP
> -        MockCompositeCacheManager<String, String> manager = new MockCompositeCacheManager<String, String>();
> +        MockCompositeCacheManager manager = new MockCompositeCacheManager();
>          MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger();
>
>          RemoteHttpCacheServerAttributes rcsa = new RemoteHttpCacheServerAttributes();
> @@ -93,7 +93,7 @@ public class RemoteHttpCacheServiceUnitT
>          throws Exception
>      {
>          // SETUP
> -        MockCompositeCacheManager<String, String> manager = new MockCompositeCacheManager<String, String>();
> +        MockCompositeCacheManager manager = new MockCompositeCacheManager();
>          MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger();
>
>          RemoteHttpCacheServerAttributes rcsa = new RemoteHttpCacheServerAttributes();
> @@ -117,7 +117,7 @@ public class RemoteHttpCacheServiceUnitT
>          throws Exception
>      {
>          // SETUP
> -        MockCompositeCacheManager<String, String> manager = new MockCompositeCacheManager<String, String>();
> +        MockCompositeCacheManager manager = new MockCompositeCacheManager();
>          MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger();
>
>          RemoteHttpCacheServerAttributes rcsa = new RemoteHttpCacheServerAttributes();
> @@ -141,7 +141,7 @@ public class RemoteHttpCacheServiceUnitT
>          throws Exception
>      {
>          // SETUP
> -        MockCompositeCacheManager<String, String> manager = new MockCompositeCacheManager<String, String>();
> +        MockCompositeCacheManager manager = new MockCompositeCacheManager();
>          MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger();
>
>          RemoteHttpCacheServerAttributes rcsa = new RemoteHttpCacheServerAttributes();
> @@ -165,7 +165,7 @@ public class RemoteHttpCacheServiceUnitT
>          throws Exception
>      {
>          // SETUP
> -        MockCompositeCacheManager<String, String> manager = new MockCompositeCacheManager<String, String>();
> +        MockCompositeCacheManager manager = new MockCompositeCacheManager();
>          MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger();
>
>          RemoteHttpCacheServerAttributes rcsa = new RemoteHttpCacheServerAttributes();
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheSeviceFactoryUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheSeviceFactoryUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheSeviceFactoryUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheSeviceFactoryUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -36,7 +36,7 @@ public class RemoteHttpCacheSeviceFactor
>      public void testCreateRemoteHttpCacheService_WithLogger()
>      {
>          // SETUP
> -        MockCompositeCacheManager<String, String> manager = new  MockCompositeCacheManager<String, String>();
> +        MockCompositeCacheManager manager = new MockCompositeCacheManager();
>          String className = MockCacheEventLogger.class.getName();
>
>          Properties props = new Properties();
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -72,7 +72,7 @@ public class BasicRemoteCacheClientServe
>          throws Exception
>      {
>          // SETUP
> -        MockCompositeCacheManager<String, String> compositeCacheManager = new MockCompositeCacheManager<String, String>();
> +        MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager();
>
>          RemoteCacheAttributes attributes = new RemoteCacheAttributes();
>          attributes.setRemoteHost( "localhost" );
> @@ -109,7 +109,7 @@ public class BasicRemoteCacheClientServe
>          throws Exception
>      {
>          // SETUP
> -        MockCompositeCacheManager<String, String> compositeCacheManager = new MockCompositeCacheManager<String, String>();
> +        MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager();
>
>          RemoteCacheAttributes attributes = new RemoteCacheAttributes();
>          attributes.setRemoteHost( "localhost" );
> @@ -155,7 +155,7 @@ public class BasicRemoteCacheClientServe
>          throws Exception
>      {
>          // SETUP
> -        MockCompositeCacheManager<String, String> compositeCacheManager = new MockCompositeCacheManager<String, String>();
> +        MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager();
>
>          RemoteCacheAttributes attributes = new RemoteCacheAttributes();
>          attributes.setRemoteHost( "localhost" );
> @@ -197,7 +197,7 @@ public class BasicRemoteCacheClientServe
>          throws Exception
>      {
>          // SETUP
> -        MockCompositeCacheManager<String, String> compositeCacheManager = new MockCompositeCacheManager<String, String>();
> +        MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager();
>
>          RemoteCacheAttributes attributes = new RemoteCacheAttributes();
>          attributes.setRemoteHost( "localhost" );
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/server/RemoteCacheServerFactoryUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/server/RemoteCacheServerFactoryUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/server/RemoteCacheServerFactoryUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/server/RemoteCacheServerFactoryUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -3,10 +3,10 @@ package org.apache.jcs.auxiliary.remote.
>  import java.rmi.server.RMISocketFactory;
>  import java.util.Properties;
>
> -import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheConstants;
> -
>  import junit.framework.TestCase;
>
> +import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheConstants;
> +
>  /** Unit tests for the factory */
>  public class RemoteCacheServerFactoryUnitTest
>      extends TestCase
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/server/RemoteCacheServerStartupUtil.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/server/RemoteCacheServerStartupUtil.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/server/RemoteCacheServerStartupUtil.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/server/RemoteCacheServerStartupUtil.java Sat Aug  4 14:23:36 2012
> @@ -20,6 +20,7 @@ package org.apache.jcs.auxiliary.remote.
>   */
>
>  import java.io.IOException;
> +import java.io.Serializable;
>  import java.net.InetAddress;
>  import java.net.UnknownHostException;
>  import java.rmi.RemoteException;
> @@ -49,7 +50,7 @@ public class RemoteCacheServerStartupUti
>       * @param propsFileName
>       * @return RemoteCacheServer
>       */
> -    public static RemoteCacheServer startServerUsingProperties( String propsFileName )
> +    public static <K extends Serializable, V extends Serializable> RemoteCacheServer<K, V> startServerUsingProperties( String propsFileName )
>      {
>          // TODO load from props file or get as init param or get from jndi, or
>          // all three
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/CompositeCacheDiskUsageUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/CompositeCacheDiskUsageUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/CompositeCacheDiskUsageUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/CompositeCacheDiskUsageUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -103,7 +103,9 @@ public class CompositeCacheDiskUsageUnit
>          MockAuxCache<String, String> mock = new MockAuxCache<String, String>();
>          mock.cacheType = AuxiliaryCache.DISK_CACHE;
>
> -        cache.setAuxCaches( new AuxiliaryCache[] { mock } );
> +        @SuppressWarnings("unchecked")
> +        AuxiliaryCache<String, String>[] auxArray = new AuxiliaryCache[] { mock };
> +        cache.setAuxCaches( auxArray );
>
>          ICacheElement<String, String> inputElement = new CacheElement<String, String>( "testSpoolAllowed", "key", "value" );
>
> @@ -132,7 +134,9 @@ public class CompositeCacheDiskUsageUnit
>          MockAuxCache<String, String> mock = new MockAuxCache<String, String>();
>          mock.cacheType = AuxiliaryCache.DISK_CACHE;
>
> -        cache.setAuxCaches( new AuxiliaryCache[] { mock } );
> +        @SuppressWarnings("unchecked")
> +        AuxiliaryCache<String, String>[] auxArray = new AuxiliaryCache[] { mock };
> +        cache.setAuxCaches( auxArray );
>
>          ICacheElement<String, String> inputElement = new CacheElement<String, String>( "testSpoolAllowed", "key", "value" );
>
> @@ -165,7 +169,9 @@ public class CompositeCacheDiskUsageUnit
>          MockAuxCache<String, String> mock = new MockAuxCache<String, String>();
>          mock.cacheType = AuxiliaryCache.DISK_CACHE;
>
> -        cache.setAuxCaches( new AuxiliaryCache[] { mock } );
> +        @SuppressWarnings("unchecked")
> +        AuxiliaryCache<String, String>[] auxArray = new AuxiliaryCache[] { mock };
> +        cache.setAuxCaches( auxArray );
>
>          ICacheElement<String, String> inputElement = new CacheElement<String, String>( "testSpoolAllowed", "key", "value" );
>
> @@ -200,7 +206,9 @@ public class CompositeCacheDiskUsageUnit
>          MockAuxCache<String, String> mock = new MockAuxCache<String, String>();
>          mock.cacheType = AuxiliaryCache.DISK_CACHE;
>
> -        cache.setAuxCaches( new AuxiliaryCache[] { mock } );
> +        @SuppressWarnings("unchecked")
> +        AuxiliaryCache<String, String>[] auxArray = new AuxiliaryCache[] { mock };
> +        cache.setAuxCaches( auxArray );
>
>          ICacheElement<String, String> inputElement = new CacheElement<String, String>( "testSpoolAllowed", "key", "value" );
>
> @@ -235,7 +243,9 @@ public class CompositeCacheDiskUsageUnit
>          MockAuxCache<String, String> mock = new MockAuxCache<String, String>();
>          mock.cacheType = AuxiliaryCache.DISK_CACHE;
>
> -        cache.setAuxCaches( new AuxiliaryCache[] { mock } );
> +        @SuppressWarnings("unchecked")
> +        AuxiliaryCache<String, String>[] auxArray = new AuxiliaryCache[] { mock };
> +        cache.setAuxCaches( auxArray );
>
>          ICacheElement<String, String> inputElement = new CacheElement<String, String>( "testSpoolAllowed", "key", "value" );
>
> @@ -271,7 +281,9 @@ public class CompositeCacheDiskUsageUnit
>          MockAuxCache<String, String> mockLateral = new MockAuxCache<String, String>();
>          mockLateral.cacheType = AuxiliaryCache.LATERAL_CACHE;
>
> -        cache.setAuxCaches( new AuxiliaryCache[] { mock, mockLateral } );
> +        @SuppressWarnings("unchecked")
> +        AuxiliaryCache<String, String>[] auxArray = new AuxiliaryCache[] { mock, mockLateral };
> +        cache.setAuxCaches( auxArray );
>
>          ICacheElement<String, String> inputElement = new CacheElement<String, String>( "testSpoolAllowed", "key", "value" );
>
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/CompositeCacheUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/CompositeCacheUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/CompositeCacheUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/CompositeCacheUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -64,6 +64,7 @@ public class CompositeCacheUnitTest
>
>          MockAuxiliaryCache<String, Integer> diskMock = new MockAuxiliaryCache<String, Integer>();
>          diskMock.cacheType = ICache.DISK_CACHE;
> +        @SuppressWarnings("unchecked")
>          AuxiliaryCache<String, Integer>[] aux = new AuxiliaryCache[] { diskMock };
>          cache.setAuxCaches( aux );
>
> @@ -103,6 +104,7 @@ public class CompositeCacheUnitTest
>
>          MockAuxiliaryCache<String, Integer> diskMock = new MockAuxiliaryCache<String, Integer>();
>          diskMock.cacheType = ICache.REMOTE_CACHE;
> +        @SuppressWarnings("unchecked")
>          AuxiliaryCache<String, Integer>[] aux = new AuxiliaryCache[] { diskMock };
>          cache.setAuxCaches( aux );
>
> @@ -145,6 +147,7 @@ public class CompositeCacheUnitTest
>
>          MockAuxiliaryCache<String, Integer> diskMock = new MockAuxiliaryCache<String, Integer>();
>          diskMock.cacheType = ICache.DISK_CACHE;
> +        @SuppressWarnings("unchecked")
>          AuxiliaryCache<String, Integer>[] aux = new AuxiliaryCache[] { diskMock };
>          cache.setAuxCaches( aux );
>
> @@ -195,6 +198,7 @@ public class CompositeCacheUnitTest
>
>          MockAuxiliaryCache<String, Integer> diskMock = new MockAuxiliaryCache<String, Integer>();
>          diskMock.cacheType = ICache.DISK_CACHE;
> +        @SuppressWarnings("unchecked")
>          AuxiliaryCache<String, Integer>[] aux = new AuxiliaryCache[] { diskMock };
>          cache.setAuxCaches( aux );
>
> @@ -227,6 +231,7 @@ public class CompositeCacheUnitTest
>
>          MockAuxiliaryCache<String, Integer> diskMock = new MockAuxiliaryCache<String, Integer>();
>          diskMock.cacheType = ICache.REMOTE_CACHE;
> +        @SuppressWarnings("unchecked")
>          AuxiliaryCache<String, Integer>[] aux = new AuxiliaryCache[] { diskMock };
>          cache.setAuxCaches( aux );
>
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/MockCompositeCacheManager.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/MockCompositeCacheManager.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/MockCompositeCacheManager.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/MockCompositeCacheManager.java Sat Aug  4 14:23:36 2012
> @@ -27,11 +27,11 @@ import org.apache.jcs.engine.ElementAttr
>  import org.apache.jcs.engine.behavior.ICompositeCacheManager;
>
>  /** For testing. */
> -public class MockCompositeCacheManager<K extends Serializable, V extends Serializable>
> +public class MockCompositeCacheManager
>      implements ICompositeCacheManager
>  {
>      /** The cache that was returned. */
> -    private CompositeCache<K, V> cache;
> +    private CompositeCache<? extends Serializable, ? extends Serializable> cache;
>
>      /** Properties with which this manager was configured. This is exposed for other managers. */
>      private Properties configurationProperties;
> @@ -40,7 +40,8 @@ public class MockCompositeCacheManager<K
>       * @param cacheName
>       * @return Returns a CompositeCache
>       */
> -    public CompositeCache<K, V> getCache( String cacheName )
> +    @SuppressWarnings("unchecked")
> +    public <K extends Serializable, V extends Serializable> CompositeCache<K, V> getCache( String cacheName )
>      {
>          if ( cache == null )
>          {
> @@ -49,13 +50,14 @@ public class MockCompositeCacheManager<K
>                                                            new ElementAttributes() );
>              this.setCache( newCache );
>          }
> -        return cache;
> +
> +        return (CompositeCache<K, V>)cache;
>      }
>
>      /**
>       * @param cache The cache to set.
>       */
> -    public void setCache( CompositeCache<K, V> cache )
> +    public void setCache( CompositeCache<? extends Serializable, ? extends Serializable> cache )
>      {
>          this.cache = cache;
>      }
> @@ -63,7 +65,7 @@ public class MockCompositeCacheManager<K
>      /**
>       * @return Returns the cache.
>       */
> -    public CompositeCache<K, V> getCache()
> +    public CompositeCache<? extends Serializable, ? extends Serializable> getCache()
>      {
>          return cache;
>      }
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/utils/date/ThreadSafeSimpleDateFormatUnitTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/utils/date/ThreadSafeSimpleDateFormatUnitTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/utils/date/ThreadSafeSimpleDateFormatUnitTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/utils/date/ThreadSafeSimpleDateFormatUnitTest.java Sat Aug  4 14:23:36 2012
> @@ -31,16 +31,16 @@ public class ThreadSafeSimpleDateFormatU
>      private static final int NUM_THREADS = 50;
>
>      /** random number generator */
> -    private static final Random random = new Random();
> +    protected static final Random random = new Random();
>
>      /** number wrong */
> -    private int numWrong = 0;
> +    protected int numWrong = 0;
>
>      /** number of loops? */
> -    private int numLoops = 0;
> +    protected int numLoops = 0;
>
>      /** run? */
> -    private boolean run = false;
> +    protected boolean run = false;
>
>      /** a simpledateformat instance */
>      private SimpleDateFormat simpleDateFormat = new SimpleDateFormat( DATE_FORMAT_STRING );
> @@ -49,7 +49,7 @@ public class ThreadSafeSimpleDateFormatU
>      private ThreadSafeSimpleDateFormat threadSafeSimpleDateFormat = new ThreadSafeSimpleDateFormat( DATE_FORMAT_STRING );
>
>      /** date format */
> -    private DateFormat dateFormat;
> +    protected DateFormat dateFormat;
>
>      /**
>       * Tests to make sure that format produces the same string on the thread-safe implementation as
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/utils/struct/JCSvsCommonsLRUMapPerformanceTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/utils/struct/JCSvsCommonsLRUMapPerformanceTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/utils/struct/JCSvsCommonsLRUMapPerformanceTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/utils/struct/JCSvsCommonsLRUMapPerformanceTest.java Sat Aug  4 14:23:36 2012
> @@ -144,6 +144,7 @@ public class JCSvsCommonsLRUMapPerforman
>                  // /////////////////////////////////////////////////////////////
>                  cache2Name = "Commons  ";
>                  // or LRUMapJCS
> +                @SuppressWarnings("unchecked")
>                  Map<String, String> cache2 = new org.apache.commons.collections.map.LRUMap( tries );
>                  // cache2Name = "Hashtable";
>                  // Hashtable cache2 = new Hashtable();
>
> Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/utils/struct/LRUMapPerformanceTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/utils/struct/LRUMapPerformanceTest.java?rev=1369332&r1=1369331&r2=1369332&view=diff
> ==============================================================================
> --- commons/proper/jcs/trunk/src/test/org/apache/jcs/utils/struct/LRUMapPerformanceTest.java (original)
> +++ commons/proper/jcs/trunk/src/test/org/apache/jcs/utils/struct/LRUMapPerformanceTest.java Sat Aug  4 14:23:36 2012
> @@ -137,6 +137,7 @@ public class LRUMapPerformanceTest
>                  ///////////////////////////////////////////////////////////////
>                  cache2Name = "LRUMapJCS (commons)";
>                  //or LRUMapJCS
> +                @SuppressWarnings("unchecked")
>                  Map<String, String> cache2 = new org.apache.commons.collections.map.LRUMap( tries );
>                  //cache2Name = "Hashtable";
>                  //Hashtable cache2 = new Hashtable();
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org