Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6A159DD04 for ; Sun, 5 Aug 2012 22:09:43 +0000 (UTC) Received: (qmail 84496 invoked by uid 500); 5 Aug 2012 22:09:42 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 84395 invoked by uid 500); 5 Aug 2012 22:09:42 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 84386 invoked by uid 99); 5 Aug 2012 22:09:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Aug 2012 22:09:42 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sebbaz@gmail.com designates 209.85.220.171 as permitted sender) Received: from [209.85.220.171] (HELO mail-vc0-f171.google.com) (209.85.220.171) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Aug 2012 22:09:33 +0000 Received: by vcdd16 with SMTP id d16so3082618vcd.30 for ; Sun, 05 Aug 2012 15:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=VSF/IJobLSl5sS2KKa/pv8xeQfzwEPmqoiadx03kmqM=; b=nfi1xhfUGozXin1cuH/pIOfQyvRlCsyyrthbQxoXjuPVkIgx75BXd/LjsWYS7WPFvn agoCR4nfLd33pqTdHfAX6jPwlUQLdFJsekYYnTj7DHTm9lqqrJ2EzhY9CLtCmqxcRdMv /T3vPQAuKPv2q5GdLyjEorfDWUhlb7kn3jOp4G/LDZKWSP4TZn7RGCP+S7CFgBWEvLt4 QSBG9068JWlpYZxv67O3JXN7iVZcDRJNeLBB0JwXXL8FvIz/NCb28fd45+TkGxt2AVi5 3iGQ5F3Ex8D/5wXN/6HnH26jlkc4bt8TzVB3/hbHL+WgQPoddwlsArmh1Np0618TvTsf vN6w== MIME-Version: 1.0 Received: by 10.52.72.79 with SMTP id b15mr5758965vdv.13.1344204551877; Sun, 05 Aug 2012 15:09:11 -0700 (PDT) Received: by 10.58.33.200 with HTTP; Sun, 5 Aug 2012 15:09:11 -0700 (PDT) Date: Sun, 5 Aug 2012 23:09:11 +0100 Message-ID: Subject: 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 From: sebb To: dev@commons.apache.org Content-Type: text/plain; charset=ISO-8859-1 On 4 August 2012 15:23, 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 blockDiskCache = new BlockDiskCache( attributes ); > - > - BlockDiskKeyStore keyStore = new BlockDiskKeyStore( attributes, blockDiskCache ); > + BlockDiskKeyStore keyStore = new BlockDiskKeyStore( 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[] 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(); > + 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[] createCacheElementsWithTestObjects( int numToCreate, int bytes, String cacheName ) > { > + @SuppressWarnings("unchecked") > ICacheElement[] elements = new ICacheElement[numToCreate]; > for ( int i = 0; i < numToCreate; i++ ) > { > @@ -124,6 +125,7 @@ public class DiskTestObjectUtil > */ > public static ICacheElement[] createCacheElementsWithTestObjectsOfVariableSizes( int numToCreate, String cacheName ) > { > + @SuppressWarnings("unchecked") > ICacheElement[] 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 > *

> * @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 > *

> * @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 compositeCacheManager = new MockCompositeCacheManager(); > + MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager(); > compositeCacheManager.setConfigurationProperties( props ); > > JDBCDiskCache diskCache = new JDBCDiskCache( 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 cache = (MySQLDiskCache) manager.getCache( cacheName ); > + MySQLDiskCache 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 cache = new MySQLDiskCache( 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[] 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[] 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[] 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[] 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[] 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[] 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[] 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[] 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 noWait = (LateralCacheNoWait) lcm.getCache( cacheName ); > + LateralCacheNoWait noWait = lcm.getCache( cacheName ); > > + @SuppressWarnings("unchecked") > LateralCacheNoWait[] 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 noWait = (LateralCacheNoWait) lcm.getCache( cacheName ); > + LateralCacheNoWait noWait = lcm.getCache( cacheName ); > > + @SuppressWarnings("unchecked") > LateralCacheNoWait[] 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 listener = (LateralTCPListener) LateralTCPListener.getInstance( lac, cacheMgr ); > + LateralTCPListener 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 cacheMgr = new MockCompositeCacheManager(); > + 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 cacheMgr = new MockCompositeCacheManager(); > - System.out.println( "mock cache = " + cacheMgr.getCache( "test" ) ); > + MockCompositeCacheManager cacheMgr = new MockCompositeCacheManager(); > + CompositeCache 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 cacheElement = cacheMgr.getCache().get( "key" ); > + ICacheElement 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 cacheMgr = new MockCompositeCacheManager(); > - System.out.println( "mock cache = " + cacheMgr.getCache( "test" ) ); > + MockCompositeCacheManager cacheMgr = new MockCompositeCacheManager(); > + CompositeCache 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 cacheElement = cacheMgr.getCache().get( "key" ); > + ICacheElement 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 cacheMgr = new MockCompositeCacheManager(); > - System.out.println( "mock cache = " + cacheMgr.getCache( "test" ) ); > + MockCompositeCacheManager cacheMgr = new MockCompositeCacheManager(); > + CompositeCache 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 element = new CacheElement( "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 cacheMgr = new MockCompositeCacheManager(); > - System.out.println( "mock cache = " + cacheMgr.getCache( "test" ) ); > + MockCompositeCacheManager cacheMgr = new MockCompositeCacheManager(); > + CompositeCache 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 element = new CacheElement( "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 new HashMap, Map>>(); > > /** The last service passed to fixCache */ > - public IRemoteCacheService fixed; > + public ICacheServiceNonLocal fixed; > > /** Attributes. */ > public RemoteCacheAttributes attributes = new RemoteCacheAttributes(); > @@ -79,11 +79,12 @@ public class MockRemoteCacheClient * Stores the last argument as fixed. > *

> * (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)remote; > + fixed = (ICacheServiceNonLocal)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 > - implements IRemoteCacheService > + implements ICacheServiceNonLocal > { > /** The key last passed to get */ > public Serializable lastGetKey; > @@ -99,7 +99,7 @@ public class MockRemoteCacheService * Set the lastRemoveAllCacheName to the cacheName. > *

> * (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(); > + ICompositeCacheManager cacheMgr = new MockCompositeCacheManager(); > RemoteCacheListener listener = new RemoteCacheListener( 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(); > RemoteCacheListener listener = new RemoteCacheListener( 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 zombie = new ZombieRemoteCacheService( 10 ); > + ZombieCacheServiceNonLocal zombie = new ZombieCacheServiceNonLocal( 10 ); > MockRemoteCacheService service = new MockRemoteCacheService(); > MockRemoteCacheListener listener = new MockRemoteCacheListener(); > > > 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(); > + 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 service = new MockRemoteCacheService(); > > - ZombieRemoteCacheService zombie = new ZombieRemoteCacheService( 10 ); > + ZombieCacheServiceNonLocal zombie = new ZombieCacheServiceNonLocal( 10 ); > > String cacheName = "testUpdate"; > > @@ -65,7 +66,7 @@ public class ZombieRemoteCacheServiceUni > // SETUP > MockRemoteCacheService service = new MockRemoteCacheService(); > > - ZombieRemoteCacheService zombie = new ZombieRemoteCacheService( 0 ); > + ZombieCacheServiceNonLocal zombie = new ZombieCacheServiceNonLocal( 0 ); > > String cacheName = "testUpdate"; > > @@ -89,7 +90,7 @@ public class ZombieRemoteCacheServiceUni > // SETUP > MockRemoteCacheService service = new MockRemoteCacheService(); > > - ZombieRemoteCacheService zombie = new ZombieRemoteCacheService( 10 ); > + ZombieCacheServiceNonLocal zombie = new ZombieCacheServiceNonLocal( 10 ); > > String cacheName = "testRemoveThenWalk"; > String key = "myKey"; > @@ -113,7 +114,7 @@ public class ZombieRemoteCacheServiceUni > // SETUP > MockRemoteCacheService service = new MockRemoteCacheService(); > > - ZombieRemoteCacheService zombie = new ZombieRemoteCacheService( 10 ); > + ZombieCacheServiceNonLocal zombie = new ZombieCacheServiceNonLocal( 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. > *

> - * @param remoteCacheRequest > + * @param remoteCacheRequest > * @return RemoteCacheResponse > - * @throws IOException */ > - public RemoteCacheResponse dispatchRequest( RemoteCacheRequest remoteCacheRequest ) > + * @throws IOException > + */ > + @SuppressWarnings("unchecked") > + public > + RemoteCacheResponse dispatchRequest( RemoteCacheRequest remoteCacheRequest ) > throws IOException > { > this.lastRemoteCacheRequest = remoteCacheRequest; > - return setupRemoteCacheResponse; > + return (RemoteCacheResponse)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 remoteCacheRequest = new RemoteCacheRequest(); > 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)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 manager = new MockCompositeCacheManager(); > + MockCompositeCacheManager manager = new MockCompositeCacheManager(); > MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger(); > > RemoteHttpCacheServerAttributes rcsa = new RemoteHttpCacheServerAttributes(); > @@ -69,7 +69,7 @@ public class RemoteHttpCacheServiceUnitT > throws Exception > { > // SETUP > - MockCompositeCacheManager manager = new MockCompositeCacheManager(); > + MockCompositeCacheManager manager = new MockCompositeCacheManager(); > MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger(); > > RemoteHttpCacheServerAttributes rcsa = new RemoteHttpCacheServerAttributes(); > @@ -93,7 +93,7 @@ public class RemoteHttpCacheServiceUnitT > throws Exception > { > // SETUP > - MockCompositeCacheManager manager = new MockCompositeCacheManager(); > + MockCompositeCacheManager manager = new MockCompositeCacheManager(); > MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger(); > > RemoteHttpCacheServerAttributes rcsa = new RemoteHttpCacheServerAttributes(); > @@ -117,7 +117,7 @@ public class RemoteHttpCacheServiceUnitT > throws Exception > { > // SETUP > - MockCompositeCacheManager manager = new MockCompositeCacheManager(); > + MockCompositeCacheManager manager = new MockCompositeCacheManager(); > MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger(); > > RemoteHttpCacheServerAttributes rcsa = new RemoteHttpCacheServerAttributes(); > @@ -141,7 +141,7 @@ public class RemoteHttpCacheServiceUnitT > throws Exception > { > // SETUP > - MockCompositeCacheManager manager = new MockCompositeCacheManager(); > + MockCompositeCacheManager manager = new MockCompositeCacheManager(); > MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger(); > > RemoteHttpCacheServerAttributes rcsa = new RemoteHttpCacheServerAttributes(); > @@ -165,7 +165,7 @@ public class RemoteHttpCacheServiceUnitT > throws Exception > { > // SETUP > - MockCompositeCacheManager manager = new MockCompositeCacheManager(); > + 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 manager = new MockCompositeCacheManager(); > + 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 compositeCacheManager = new MockCompositeCacheManager(); > + MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager(); > > RemoteCacheAttributes attributes = new RemoteCacheAttributes(); > attributes.setRemoteHost( "localhost" ); > @@ -109,7 +109,7 @@ public class BasicRemoteCacheClientServe > throws Exception > { > // SETUP > - MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager(); > + MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager(); > > RemoteCacheAttributes attributes = new RemoteCacheAttributes(); > attributes.setRemoteHost( "localhost" ); > @@ -155,7 +155,7 @@ public class BasicRemoteCacheClientServe > throws Exception > { > // SETUP > - MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager(); > + MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager(); > > RemoteCacheAttributes attributes = new RemoteCacheAttributes(); > attributes.setRemoteHost( "localhost" ); > @@ -197,7 +197,7 @@ public class BasicRemoteCacheClientServe > throws Exception > { > // SETUP > - MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager(); > + 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 RemoteCacheServer 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 mock = new MockAuxCache(); > mock.cacheType = AuxiliaryCache.DISK_CACHE; > > - cache.setAuxCaches( new AuxiliaryCache[] { mock } ); > + @SuppressWarnings("unchecked") > + AuxiliaryCache[] auxArray = new AuxiliaryCache[] { mock }; > + cache.setAuxCaches( auxArray ); > > ICacheElement inputElement = new CacheElement( "testSpoolAllowed", "key", "value" ); > > @@ -132,7 +134,9 @@ public class CompositeCacheDiskUsageUnit > MockAuxCache mock = new MockAuxCache(); > mock.cacheType = AuxiliaryCache.DISK_CACHE; > > - cache.setAuxCaches( new AuxiliaryCache[] { mock } ); > + @SuppressWarnings("unchecked") > + AuxiliaryCache[] auxArray = new AuxiliaryCache[] { mock }; > + cache.setAuxCaches( auxArray ); > > ICacheElement inputElement = new CacheElement( "testSpoolAllowed", "key", "value" ); > > @@ -165,7 +169,9 @@ public class CompositeCacheDiskUsageUnit > MockAuxCache mock = new MockAuxCache(); > mock.cacheType = AuxiliaryCache.DISK_CACHE; > > - cache.setAuxCaches( new AuxiliaryCache[] { mock } ); > + @SuppressWarnings("unchecked") > + AuxiliaryCache[] auxArray = new AuxiliaryCache[] { mock }; > + cache.setAuxCaches( auxArray ); > > ICacheElement inputElement = new CacheElement( "testSpoolAllowed", "key", "value" ); > > @@ -200,7 +206,9 @@ public class CompositeCacheDiskUsageUnit > MockAuxCache mock = new MockAuxCache(); > mock.cacheType = AuxiliaryCache.DISK_CACHE; > > - cache.setAuxCaches( new AuxiliaryCache[] { mock } ); > + @SuppressWarnings("unchecked") > + AuxiliaryCache[] auxArray = new AuxiliaryCache[] { mock }; > + cache.setAuxCaches( auxArray ); > > ICacheElement inputElement = new CacheElement( "testSpoolAllowed", "key", "value" ); > > @@ -235,7 +243,9 @@ public class CompositeCacheDiskUsageUnit > MockAuxCache mock = new MockAuxCache(); > mock.cacheType = AuxiliaryCache.DISK_CACHE; > > - cache.setAuxCaches( new AuxiliaryCache[] { mock } ); > + @SuppressWarnings("unchecked") > + AuxiliaryCache[] auxArray = new AuxiliaryCache[] { mock }; > + cache.setAuxCaches( auxArray ); > > ICacheElement inputElement = new CacheElement( "testSpoolAllowed", "key", "value" ); > > @@ -271,7 +281,9 @@ public class CompositeCacheDiskUsageUnit > MockAuxCache mockLateral = new MockAuxCache(); > mockLateral.cacheType = AuxiliaryCache.LATERAL_CACHE; > > - cache.setAuxCaches( new AuxiliaryCache[] { mock, mockLateral } ); > + @SuppressWarnings("unchecked") > + AuxiliaryCache[] auxArray = new AuxiliaryCache[] { mock, mockLateral }; > + cache.setAuxCaches( auxArray ); > > ICacheElement inputElement = new CacheElement( "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 diskMock = new MockAuxiliaryCache(); > diskMock.cacheType = ICache.DISK_CACHE; > + @SuppressWarnings("unchecked") > AuxiliaryCache[] aux = new AuxiliaryCache[] { diskMock }; > cache.setAuxCaches( aux ); > > @@ -103,6 +104,7 @@ public class CompositeCacheUnitTest > > MockAuxiliaryCache diskMock = new MockAuxiliaryCache(); > diskMock.cacheType = ICache.REMOTE_CACHE; > + @SuppressWarnings("unchecked") > AuxiliaryCache[] aux = new AuxiliaryCache[] { diskMock }; > cache.setAuxCaches( aux ); > > @@ -145,6 +147,7 @@ public class CompositeCacheUnitTest > > MockAuxiliaryCache diskMock = new MockAuxiliaryCache(); > diskMock.cacheType = ICache.DISK_CACHE; > + @SuppressWarnings("unchecked") > AuxiliaryCache[] aux = new AuxiliaryCache[] { diskMock }; > cache.setAuxCaches( aux ); > > @@ -195,6 +198,7 @@ public class CompositeCacheUnitTest > > MockAuxiliaryCache diskMock = new MockAuxiliaryCache(); > diskMock.cacheType = ICache.DISK_CACHE; > + @SuppressWarnings("unchecked") > AuxiliaryCache[] aux = new AuxiliaryCache[] { diskMock }; > cache.setAuxCaches( aux ); > > @@ -227,6 +231,7 @@ public class CompositeCacheUnitTest > > MockAuxiliaryCache diskMock = new MockAuxiliaryCache(); > diskMock.cacheType = ICache.REMOTE_CACHE; > + @SuppressWarnings("unchecked") > AuxiliaryCache[] 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 > +public class MockCompositeCacheManager > implements ICompositeCacheManager > { > /** The cache that was returned. */ > - private CompositeCache cache; > + private CompositeCache cache; > > /** Properties with which this manager was configured. This is exposed for other managers. */ > private Properties configurationProperties; > @@ -40,7 +40,8 @@ public class MockCompositeCacheManager * @param cacheName > * @return Returns a CompositeCache > */ > - public CompositeCache getCache( String cacheName ) > + @SuppressWarnings("unchecked") > + public CompositeCache getCache( String cacheName ) > { > if ( cache == null ) > { > @@ -49,13 +50,14 @@ public class MockCompositeCacheManager new ElementAttributes() ); > this.setCache( newCache ); > } > - return cache; > + > + return (CompositeCache)cache; > } > > /** > * @param cache The cache to set. > */ > - public void setCache( CompositeCache cache ) > + public void setCache( CompositeCache cache ) > { > this.cache = cache; > } > @@ -63,7 +65,7 @@ public class MockCompositeCacheManager /** > * @return Returns the cache. > */ > - public CompositeCache getCache() > + public CompositeCache 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 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 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