You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tv...@apache.org on 2019/05/24 09:26:51 UTC

svn commit: r1859859 [5/5] - in /commons/proper/jcs/trunk/commons-jcs-core/src: main/java/org/apache/commons/jcs/ main/java/org/apache/commons/jcs/access/ main/java/org/apache/commons/jcs/admin/ main/java/org/apache/commons/jcs/auxiliary/ main/java/org...

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/lru/LHMLRUMemoryCacheUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/lru/LHMLRUMemoryCacheUnitTest.java?rev=1859859&r1=1859858&r2=1859859&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/lru/LHMLRUMemoryCacheUnitTest.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/lru/LHMLRUMemoryCacheUnitTest.java Fri May 24 09:26:50 2019
@@ -95,7 +95,7 @@ public class LHMLRUMemoryCacheUnitTest
         }
 
         // Test that getMultiple returns all the items remaining in cache and none of the missing ones
-        Set<String> keys = new HashSet<String>();
+        Set<String> keys = new HashSet<>();
         for ( int i = 0; i < items; i++ )
         {
             keys.add( i + ":key" );
@@ -252,7 +252,7 @@ public class LHMLRUMemoryCacheUnitTest
         cacheMgr.configure( "/TestLHMLRUCache.ccf" );
         CompositeCache<String, String> cache = cacheMgr.getCache( "testGetKeyArray" );
 
-        LHMLRUMemoryCache<String, String> mru = new LHMLRUMemoryCache<String, String>();
+        LHMLRUMemoryCache<String, String> mru = new LHMLRUMemoryCache<>();
         mru.initialize( cache );
 
         int max = cache.getCacheAttributes().getMaxObjects();
@@ -260,7 +260,7 @@ public class LHMLRUMemoryCacheUnitTest
 
         for ( int i = 0; i < items; i++ )
         {
-            ICacheElement<String, String> ice = new CacheElement<String, String>( cache.getCacheName(), i + ":key", cache.getCacheName() + " data " + i );
+            ICacheElement<String, String> ice = new CacheElement<>( cache.getCacheName(), i + ":key", cache.getCacheName() + " data " + i );
             ice.setElementAttributes( cache.getElementAttributes() );
             mru.update( ice );
         }

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/lru/LRUMemoryCacheConcurrentUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/lru/LRUMemoryCacheConcurrentUnitTest.java?rev=1859859&r1=1859858&r2=1859859&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/lru/LRUMemoryCacheConcurrentUnitTest.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/lru/LRUMemoryCacheConcurrentUnitTest.java Fri May 24 09:26:50 2019
@@ -112,14 +112,14 @@ public class LRUMemoryCacheConcurrentUni
         cacheMgr.configure( "/TestDiskCache.ccf" );
         CompositeCache<String, String> cache = cacheMgr.getCache( region );
 
-        LRUMemoryCache<String, String> lru = new LRUMemoryCache<String, String>();
+        LRUMemoryCache<String, String> lru = new LRUMemoryCache<>();
         lru.initialize( cache );
 
         // Add items to cache
 
         for ( int i = 0; i < items; i++ )
         {
-            ICacheElement<String, String> ice = new CacheElement<String, String>( cache.getCacheName(), i + ":key", region + " data " + i );
+            ICacheElement<String, String> ice = new CacheElement<>( cache.getCacheName(), i + ":key", region + " data " + i );
             ice.setElementAttributes( cache.getElementAttributes() );
             lru.update( ice );
         }
@@ -138,7 +138,7 @@ public class LRUMemoryCacheConcurrentUni
         }
 
         // Test that getMultiple returns all the items remaining in cache and none of the missing ones
-        Set<String> keys = new HashSet<String>();
+        Set<String> keys = new HashSet<>();
         for ( int i = 0; i < items; i++ )
         {
             keys.add( i + ":key" );

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/mru/MRUMemoryCacheUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/mru/MRUMemoryCacheUnitTest.java?rev=1859859&r1=1859858&r2=1859859&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/mru/MRUMemoryCacheUnitTest.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/mru/MRUMemoryCacheUnitTest.java Fri May 24 09:26:50 2019
@@ -95,7 +95,7 @@ public class MRUMemoryCacheUnitTest
         }
 
         // Test that getMultiple returns all the items remaining in cache and none of the missing ones
-        Set<String> keys = new HashSet<String>();
+        Set<String> keys = new HashSet<>();
         for ( int i = 0; i < items; i++ )
         {
             keys.add( i + ":key" );
@@ -252,7 +252,7 @@ public class MRUMemoryCacheUnitTest
         cacheMgr.configure( "/TestMRUCache.ccf" );
         CompositeCache<String, String> cache = cacheMgr.getCache( "testGetKeyArray" );
 
-        MRUMemoryCache<String, String> mru = new MRUMemoryCache<String, String>();
+        MRUMemoryCache<String, String> mru = new MRUMemoryCache<>();
         mru.initialize( cache );
 
         int max = cache.getCacheAttributes().getMaxObjects();
@@ -260,7 +260,7 @@ public class MRUMemoryCacheUnitTest
 
         for ( int i = 0; i < items; i++ )
         {
-            ICacheElement<String, String> ice = new CacheElement<String, String>( cache.getCacheName(), i + ":key", cache.getCacheName() + " data " + i );
+            ICacheElement<String, String> ice = new CacheElement<>( cache.getCacheName(), i + ":key", cache.getCacheName() + " data " + i );
             ice.setElementAttributes( cache.getElementAttributes() );
             mru.update( ice );
         }

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/shrinking/ShrinkerThreadUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/shrinking/ShrinkerThreadUnitTest.java?rev=1859859&r1=1859858&r2=1859859&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/shrinking/ShrinkerThreadUnitTest.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/shrinking/ShrinkerThreadUnitTest.java Fri May 24 09:26:50 2019
@@ -51,12 +51,12 @@ public class ShrinkerThreadUnitTest
         cacheAttr.setMaxMemoryIdleTimeSeconds( 10 );
         cacheAttr.setMaxSpoolPerRun( 10 );
 
-        CompositeCache<String, String> cache = new CompositeCache<String, String>(cacheAttr, new ElementAttributes());
+        CompositeCache<String, String> cache = new CompositeCache<>(cacheAttr, new ElementAttributes());
 
         String key = "key";
         String value = "value";
 
-        ICacheElement<String, String> element = new CacheElement<String, String>( "testRegion", key, value );
+        ICacheElement<String, String> element = new CacheElement<>( "testRegion", key, value );
         ElementAttributes elementAttr = new ElementAttributes();
         elementAttr.setIsEternal( false );
         element.setElementAttributes( elementAttr );
@@ -86,12 +86,12 @@ public class ShrinkerThreadUnitTest
         cacheAttr.setMaxMemoryIdleTimeSeconds( 10 );
         cacheAttr.setMaxSpoolPerRun( 10 );
 
-        CompositeCache<String, String> cache = new CompositeCache<String, String>(cacheAttr, new ElementAttributes());
+        CompositeCache<String, String> cache = new CompositeCache<>(cacheAttr, new ElementAttributes());
 
         String key = "key";
         String value = "value";
 
-        ICacheElement<String, String> element = new CacheElement<String, String>( "testRegion", key, value );
+        ICacheElement<String, String> element = new CacheElement<>( "testRegion", key, value );
         ElementAttributes elementAttr = new ElementAttributes();
         elementAttr.setIsEternal( false );
         element.setElementAttributes( elementAttr );
@@ -121,12 +121,12 @@ public class ShrinkerThreadUnitTest
         cacheAttr.setMaxMemoryIdleTimeSeconds( 10 );
         cacheAttr.setMaxSpoolPerRun( 10 );
 
-        CompositeCache<String, String> cache = new CompositeCache<String, String>(cacheAttr, new ElementAttributes());
+        CompositeCache<String, String> cache = new CompositeCache<>(cacheAttr, new ElementAttributes());
 
         String key = "key";
         String value = "value";
 
-        ICacheElement<String, String> element = new CacheElement<String, String>( "testRegion", key, value );
+        ICacheElement<String, String> element = new CacheElement<>( "testRegion", key, value );
         ElementAttributes elementAttr = new ElementAttributes();
         elementAttr.setIsEternal( false );
         element.setElementAttributes( elementAttr );
@@ -157,12 +157,12 @@ public class ShrinkerThreadUnitTest
         cacheAttr.setMaxMemoryIdleTimeSeconds( 10 );
         cacheAttr.setMaxSpoolPerRun( 10 );
 
-        CompositeCache<String, String> cache = new CompositeCache<String, String>(cacheAttr, new ElementAttributes());
+        CompositeCache<String, String> cache = new CompositeCache<>(cacheAttr, new ElementAttributes());
 
         String key = "key";
         String value = "value";
 
-        ICacheElement<String, String> element = new CacheElement<String, String>( "testRegion", key, value );
+        ICacheElement<String, String> element = new CacheElement<>( "testRegion", key, value );
         ElementAttributes elementAttr = new ElementAttributes();
         elementAttr.setIsEternal( false );
         element.setElementAttributes( elementAttr );
@@ -198,13 +198,13 @@ public class ShrinkerThreadUnitTest
         cacheAttr.setMaxMemoryIdleTimeSeconds( 1 );
         cacheAttr.setMaxSpoolPerRun( 10 );
 
-        CompositeCache<String, String> cache = new CompositeCache<String, String>(cacheAttr, new ElementAttributes());
+        CompositeCache<String, String> cache = new CompositeCache<>(cacheAttr, new ElementAttributes());
         MockMemoryCache<String, String> memory = (MockMemoryCache<String, String>)cache.getMemoryCache();
 
         String key = "key";
         String value = "value";
 
-        ICacheElement<String, String> element = new CacheElement<String, String>( "testRegion", key, value );
+        ICacheElement<String, String> element = new CacheElement<>( "testRegion", key, value );
 
         ElementAttributes elementAttr = new ElementAttributes();
         elementAttr.setIsEternal( false );
@@ -219,7 +219,7 @@ public class ShrinkerThreadUnitTest
         ElementAttributesUtils.setLastAccessTime( elementAttr,  System.currentTimeMillis() - 2000 );
 
         // DO WORK
-        ShrinkerThread<String, String> shrinker = new ShrinkerThread<String, String>( cache );
+        ShrinkerThread<String, String> shrinker = new ShrinkerThread<>( cache );
         shrinker.run();
 
         Thread.sleep( 500 );
@@ -245,7 +245,7 @@ public class ShrinkerThreadUnitTest
         cacheAttr.setMaxMemoryIdleTimeSeconds( 1 );
         cacheAttr.setMaxSpoolPerRun( 3 );
 
-        CompositeCache<String, String> cache = new CompositeCache<String, String>(cacheAttr, new ElementAttributes());
+        CompositeCache<String, String> cache = new CompositeCache<>(cacheAttr, new ElementAttributes());
         MockMemoryCache<String, String> memory = (MockMemoryCache<String, String>)cache.getMemoryCache();
 
         for ( int i = 0; i < 10; i++ )
@@ -253,7 +253,7 @@ public class ShrinkerThreadUnitTest
             String key = "key" + i;
             String value = "value";
 
-            ICacheElement<String, String> element = new CacheElement<String, String>( "testRegion", key, value );
+            ICacheElement<String, String> element = new CacheElement<>( "testRegion", key, value );
 
             ElementAttributes elementAttr = new ElementAttributes();
             elementAttr.setIsEternal( false );
@@ -269,7 +269,7 @@ public class ShrinkerThreadUnitTest
         }
 
         // DO WORK
-        ShrinkerThread<String, String> shrinker = new ShrinkerThread<String, String>( cache );
+        ShrinkerThread<String, String> shrinker = new ShrinkerThread<>( cache );
         shrinker.run();
 
         // VERIFY
@@ -295,7 +295,7 @@ public class ShrinkerThreadUnitTest
         cacheAttr.setMaxMemoryIdleTimeSeconds( 1 );
         cacheAttr.setMaxSpoolPerRun( 3 );
 
-        CompositeCache<String, String> cache = new CompositeCache<String, String>(cacheAttr, new ElementAttributes());
+        CompositeCache<String, String> cache = new CompositeCache<>(cacheAttr, new ElementAttributes());
         MockMemoryCache<String, String> memory = (MockMemoryCache<String, String>)cache.getMemoryCache();
 
         ElementEventHandlerMockImpl handler = new ElementEventHandlerMockImpl();
@@ -305,7 +305,7 @@ public class ShrinkerThreadUnitTest
             String key = "key" + i;
             String value = "value";
 
-            ICacheElement<String, String> element = new CacheElement<String, String>( "testRegion", key, value );
+            ICacheElement<String, String> element = new CacheElement<>( "testRegion", key, value );
 
             ElementAttributes elementAttr = new ElementAttributes();
             elementAttr.addElementEventHandler( handler );
@@ -322,7 +322,7 @@ public class ShrinkerThreadUnitTest
         }
 
         // DO WORK
-        ShrinkerThread<String, String> shrinker = new ShrinkerThread<String, String>( cache );
+        ShrinkerThread<String, String> shrinker = new ShrinkerThread<>( cache );
         shrinker.run();
 
         // VERIFY

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/soft/SoftReferenceMemoryCacheUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/soft/SoftReferenceMemoryCacheUnitTest.java?rev=1859859&r1=1859858&r2=1859859&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/soft/SoftReferenceMemoryCacheUnitTest.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/engine/memory/soft/SoftReferenceMemoryCacheUnitTest.java Fri May 24 09:26:50 2019
@@ -98,7 +98,7 @@ public class SoftReferenceMemoryCacheUni
         }
 
         // Test that getMultiple returns all the items remaining in cache and none of the missing ones
-        Set<String> keys = new HashSet<String>();
+        Set<String> keys = new HashSet<>();
         for ( int i = 0; i < items; i++ )
         {
             keys.add( i + ":key" );
@@ -187,7 +187,7 @@ public class SoftReferenceMemoryCacheUni
         cacheMgr.configure( "/TestSoftReferenceCache.ccf" );
         CompositeCache<String, String> cache = cacheMgr.getCache( "testGetKeyArray" );
 
-        SoftReferenceMemoryCache<String, String> srmc = new SoftReferenceMemoryCache<String, String>();
+        SoftReferenceMemoryCache<String, String> srmc = new SoftReferenceMemoryCache<>();
         srmc.initialize( cache );
 
         int max = cache.getCacheAttributes().getMaxObjects();
@@ -195,7 +195,7 @@ public class SoftReferenceMemoryCacheUni
 
         for ( int i = 0; i < items; i++ )
         {
-            ICacheElement<String, String> ice = new CacheElement<String, String>( cache.getCacheName(), i + ":key", cache.getCacheName() + " data " + i );
+            ICacheElement<String, String> ice = new CacheElement<>( cache.getCacheName(), i + ":key", cache.getCacheName() + " data " + i );
             ice.setElementAttributes( cache.getElementAttributes() );
             srmc.update( ice );
         }

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/access/JCSWorkerUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/access/JCSWorkerUnitTest.java?rev=1859859&r1=1859858&r2=1859859&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/access/JCSWorkerUnitTest.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/access/JCSWorkerUnitTest.java Fri May 24 09:26:50 2019
@@ -42,7 +42,7 @@ public class JCSWorkerUnitTest
     public void testSimpleGet()
         throws Exception
     {
-        JCSWorker<String, Long> cachingWorker = new JCSWorker<String, Long>( "example region" );
+        JCSWorker<String, Long> cachingWorker = new JCSWorker<>( "example region" );
 
         // This is the helper.
         JCSWorkerHelper<Long> helper = new AbstractJCSWorkerHelper<Long>()

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/discovery/MockDiscoveryListener.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/discovery/MockDiscoveryListener.java?rev=1859859&r1=1859858&r2=1859859&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/discovery/MockDiscoveryListener.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/discovery/MockDiscoveryListener.java Fri May 24 09:26:50 2019
@@ -29,7 +29,7 @@ public class MockDiscoveryListener
     implements IDiscoveryListener
 {
     /** discovered services. */
-    public List<DiscoveredService> discoveredServices = new ArrayList<DiscoveredService>();
+    public List<DiscoveredService> discoveredServices = new ArrayList<>();
 
     /**
      * Adds the entry to a list. I'm not using a set. I want to see if we get dupes.

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/discovery/UDPDiscoverySenderUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/discovery/UDPDiscoverySenderUnitTest.java?rev=1859859&r1=1859858&r2=1859859&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/discovery/UDPDiscoverySenderUnitTest.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/discovery/UDPDiscoverySenderUnitTest.java Fri May 24 09:26:50 2019
@@ -87,7 +87,7 @@ public class UDPDiscoverySenderUnitTest
         throws Exception
     {
         // SETUP
-        ArrayList<String> cacheNames = new ArrayList<String>();
+        ArrayList<String> cacheNames = new ArrayList<>();
 
         // DO WORK
         sender.passiveBroadcast( SENDING_HOST, SENDING_PORT, cacheNames, 1L );
@@ -114,7 +114,7 @@ public class UDPDiscoverySenderUnitTest
         throws Exception
     {
         // SETUP
-        ArrayList<String> cacheNames = new ArrayList<String>();
+        ArrayList<String> cacheNames = new ArrayList<>();
 
         // DO WORK
         sender.removeBroadcast( SENDING_HOST, SENDING_PORT, cacheNames, 1L );

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/discovery/UDPDiscoveryServiceUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/discovery/UDPDiscoveryServiceUnitTest.java?rev=1859859&r1=1859858&r2=1859859&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/discovery/UDPDiscoveryServiceUnitTest.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/discovery/UDPDiscoveryServiceUnitTest.java Fri May 24 09:26:50 2019
@@ -48,7 +48,7 @@ public class UDPDiscoveryServiceUnitTest
 
         DiscoveredService discoveredService = new DiscoveredService();
         discoveredService.setServiceAddress( host );
-        discoveredService.setCacheNames( new ArrayList<String>() );
+        discoveredService.setCacheNames( new ArrayList<>() );
         discoveredService.setServicePort( 1000 );
         discoveredService.setLastHearFromTime( 100 );
 
@@ -81,7 +81,7 @@ public class UDPDiscoveryServiceUnitTest
         MockDiscoveryListener discoveryListener = new MockDiscoveryListener();
         service.addDiscoveryListener( discoveryListener );
 
-        ArrayList<String> sametCacheNames = new ArrayList<String>();
+        ArrayList<String> sametCacheNames = new ArrayList<>();
         sametCacheNames.add( "name1" );
 
         DiscoveredService discoveredService = new DiscoveredService();
@@ -146,11 +146,11 @@ public class UDPDiscoveryServiceUnitTest
 
         DiscoveredService discoveredService = new DiscoveredService();
         discoveredService.setServiceAddress( host );
-        discoveredService.setCacheNames( new ArrayList<String>() );
+        discoveredService.setCacheNames( new ArrayList<>() );
         discoveredService.setServicePort( 1000 );
         discoveredService.setLastHearFromTime( 100 );
 
-        ArrayList<String> differentCacheNames = new ArrayList<String>();
+        ArrayList<String> differentCacheNames = new ArrayList<>();
         differentCacheNames.add( "name1" );
         DiscoveredService discoveredService2 = new DiscoveredService();
         discoveredService2.setServiceAddress( host );
@@ -208,7 +208,7 @@ public class UDPDiscoveryServiceUnitTest
 
         DiscoveredService discoveredService = new DiscoveredService();
         discoveredService.setServiceAddress( host );
-        discoveredService.setCacheNames( new ArrayList<String>() );
+        discoveredService.setCacheNames( new ArrayList<>() );
         discoveredService.setServicePort( 1000 );
         discoveredService.setLastHearFromTime( 100 );
 

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/discovery/UDPDiscoveryUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/discovery/UDPDiscoveryUnitTest.java?rev=1859859&r1=1859858&r2=1859859&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/discovery/UDPDiscoveryUnitTest.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/discovery/UDPDiscoveryUnitTest.java Fri May 24 09:26:50 2019
@@ -63,7 +63,7 @@ public class UDPDiscoveryUnitTest
 
         // create more names than we have no wait facades for
         // the only one that gets added should be testCache1
-        ArrayList<String> cacheNames = new ArrayList<String>();
+        ArrayList<String> cacheNames = new ArrayList<>();
         int numJunk = 10;
         for ( int i = 0; i < numJunk; i++ )
         {

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/serialization/SerializationConversionUtilUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/serialization/SerializationConversionUtilUnitTest.java?rev=1859859&r1=1859858&r2=1859859&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/serialization/SerializationConversionUtilUnitTest.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/serialization/SerializationConversionUtilUnitTest.java Fri May 24 09:26:50 2019
@@ -95,7 +95,7 @@ public class SerializationConversionUtil
         IElementAttributes attr = new ElementAttributes();
         attr.setMaxLife(34);
 
-        ICacheElement<String, String> before = new CacheElement<String, String>( cacheName, key, value );
+        ICacheElement<String, String> before = new CacheElement<>( cacheName, key, value );
         before.setElementAttributes( attr );
 
         // DO WORK
@@ -136,7 +136,7 @@ public class SerializationConversionUtil
         IElementAttributes attr = new ElementAttributes();
         attr.setMaxLife(34);
 
-        ICacheElement<String, String> before = new CacheElement<String, String>( cacheName, key, value );
+        ICacheElement<String, String> before = new CacheElement<>( cacheName, key, value );
         before.setElementAttributes( attr );
 
         // DO WORK
@@ -176,7 +176,7 @@ public class SerializationConversionUtil
         IElementAttributes attr = new ElementAttributes();
         attr.setMaxLife(34);
 
-        ICacheElement<String, String> before = new CacheElement<String, String>( cacheName, key, value );
+        ICacheElement<String, String> before = new CacheElement<>( cacheName, key, value );
         before.setElementAttributes( attr );
 
         // DO WORK

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/DoubleLinkedListUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/DoubleLinkedListUnitTest.java?rev=1859859&r1=1859858&r2=1859859&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/DoubleLinkedListUnitTest.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/DoubleLinkedListUnitTest.java Fri May 24 09:26:50 2019
@@ -32,10 +32,10 @@ public class DoubleLinkedListUnitTest
     public void testAddLast_Empty()
     {
         // SETUP
-        DoubleLinkedList<DoubleLinkedListNode<String>> list = new DoubleLinkedList<DoubleLinkedListNode<String>>();
+        DoubleLinkedList<DoubleLinkedListNode<String>> list = new DoubleLinkedList<>();
 
         String payload1 = "payload1";
-        DoubleLinkedListNode<String> node1 = new DoubleLinkedListNode<String>( payload1 );
+        DoubleLinkedListNode<String> node1 = new DoubleLinkedListNode<>( payload1 );
 
         // WO WORK
         list.addLast( node1 );
@@ -48,13 +48,13 @@ public class DoubleLinkedListUnitTest
     public void testAddLast_NotEmpty()
     {
         // SETUP
-        DoubleLinkedList<DoubleLinkedListNode<String>> list = new DoubleLinkedList<DoubleLinkedListNode<String>>();
+        DoubleLinkedList<DoubleLinkedListNode<String>> list = new DoubleLinkedList<>();
 
         String payload1 = "payload1";
-        DoubleLinkedListNode<String> node1 = new DoubleLinkedListNode<String>( payload1 );
+        DoubleLinkedListNode<String> node1 = new DoubleLinkedListNode<>( payload1 );
 
         String payload2 = "payload2";
-        DoubleLinkedListNode<String> node2 = new DoubleLinkedListNode<String>( payload2 );
+        DoubleLinkedListNode<String> node2 = new DoubleLinkedListNode<>( payload2 );
 
         // WO WORK
         list.addLast( node1 );
@@ -68,13 +68,13 @@ public class DoubleLinkedListUnitTest
     public void testMakeLast_wasFirst()
     {
         // SETUP
-        DoubleLinkedList<DoubleLinkedListNode<String>> list = new DoubleLinkedList<DoubleLinkedListNode<String>>();
+        DoubleLinkedList<DoubleLinkedListNode<String>> list = new DoubleLinkedList<>();
 
         String payload1 = "payload1";
-        DoubleLinkedListNode<String> node1 = new DoubleLinkedListNode<String>( payload1 );
+        DoubleLinkedListNode<String> node1 = new DoubleLinkedListNode<>( payload1 );
 
         String payload2 = "payload2";
-        DoubleLinkedListNode<String> node2 = new DoubleLinkedListNode<String>( payload2 );
+        DoubleLinkedListNode<String> node2 = new DoubleLinkedListNode<>( payload2 );
 
         list.addFirst( node2 );
         list.addFirst(  node1 );
@@ -92,13 +92,13 @@ public class DoubleLinkedListUnitTest
     public void testMakeLast_wasLast()
     {
         // SETUP
-        DoubleLinkedList<DoubleLinkedListNode<String>> list = new DoubleLinkedList<DoubleLinkedListNode<String>>();
+        DoubleLinkedList<DoubleLinkedListNode<String>> list = new DoubleLinkedList<>();
 
         String payload1 = "payload1";
-        DoubleLinkedListNode<String> node1 = new DoubleLinkedListNode<String>( payload1 );
+        DoubleLinkedListNode<String> node1 = new DoubleLinkedListNode<>( payload1 );
 
         String payload2 = "payload2";
-        DoubleLinkedListNode<String> node2 = new DoubleLinkedListNode<String>( payload2 );
+        DoubleLinkedListNode<String> node2 = new DoubleLinkedListNode<>( payload2 );
 
         list.addFirst( node1 );
         list.addFirst(  node2 );
@@ -116,10 +116,10 @@ public class DoubleLinkedListUnitTest
     public void testMakeLast_wasAlone()
     {
         // SETUP
-        DoubleLinkedList<DoubleLinkedListNode<String>> list = new DoubleLinkedList<DoubleLinkedListNode<String>>();
+        DoubleLinkedList<DoubleLinkedListNode<String>> list = new DoubleLinkedList<>();
 
         String payload1 = "payload1";
-        DoubleLinkedListNode<String> node1 = new DoubleLinkedListNode<String>( payload1 );
+        DoubleLinkedListNode<String> node1 = new DoubleLinkedListNode<>( payload1 );
 
         list.addFirst( node1 );
 
@@ -136,16 +136,16 @@ public class DoubleLinkedListUnitTest
     public void testMakeLast_wasInMiddle()
     {
         // SETUP
-        DoubleLinkedList<DoubleLinkedListNode<String>> list = new DoubleLinkedList<DoubleLinkedListNode<String>>();
+        DoubleLinkedList<DoubleLinkedListNode<String>> list = new DoubleLinkedList<>();
 
         String payload1 = "payload1";
-        DoubleLinkedListNode<String> node1 = new DoubleLinkedListNode<String>( payload1 );
+        DoubleLinkedListNode<String> node1 = new DoubleLinkedListNode<>( payload1 );
 
         String payload2 = "payload2";
-        DoubleLinkedListNode<String> node2 = new DoubleLinkedListNode<String>( payload2 );
+        DoubleLinkedListNode<String> node2 = new DoubleLinkedListNode<>( payload2 );
 
         String payload3 = "payload3";
-        DoubleLinkedListNode<String> node3 = new DoubleLinkedListNode<String>( payload3 );
+        DoubleLinkedListNode<String> node3 = new DoubleLinkedListNode<>( payload3 );
 
         list.addFirst( node2 );
         list.addFirst(  node1 );
@@ -167,13 +167,13 @@ public class DoubleLinkedListUnitTest
         StringWriter stringWriter = new StringWriter();
         TestLogConfigurationUtil.configureLogger( stringWriter, DoubleLinkedList.class.getName() );
 
-        DoubleLinkedList<DoubleLinkedListNode<String>> list = new DoubleLinkedList<DoubleLinkedListNode<String>>();
+        DoubleLinkedList<DoubleLinkedListNode<String>> list = new DoubleLinkedList<>();
 
         String payload1 = "payload1";
-        DoubleLinkedListNode<String> node1 = new DoubleLinkedListNode<String>( payload1 );
+        DoubleLinkedListNode<String> node1 = new DoubleLinkedListNode<>( payload1 );
 
         String payload2 = "payload2";
-        DoubleLinkedListNode<String> node2 = new DoubleLinkedListNode<String>( payload2 );
+        DoubleLinkedListNode<String> node2 = new DoubleLinkedListNode<>( payload2 );
 
         list.addLast( node1 );
         list.addLast( node2 );

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/JCSvsCommonsLRUMapPerformanceTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/JCSvsCommonsLRUMapPerformanceTest.java?rev=1859859&r1=1859858&r2=1859859&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/JCSvsCommonsLRUMapPerformanceTest.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/JCSvsCommonsLRUMapPerformanceTest.java Fri May 24 09:26:50 2019
@@ -113,7 +113,7 @@ public class JCSvsCommonsLRUMapPerforman
         try
         {
 
-            Map<String, String> cache = new LRUMap<String, String>( tries );
+            Map<String, String> cache = new LRUMap<>( tries );
 
             for ( int j = 0; j < loops; j++ )
             {

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/LRUMapConcurrentUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/LRUMapConcurrentUnitTest.java?rev=1859859&r1=1859858&r2=1859859&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/LRUMapConcurrentUnitTest.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/LRUMapConcurrentUnitTest.java Fri May 24 09:26:50 2019
@@ -57,7 +57,7 @@ public class LRUMapConcurrentUnitTest
         TestSuite suite = new TestSuite( LRUMapConcurrentUnitTest.class );
 
         // run concurrent tests
-        final LRUMap<String, String> map = new LRUMap<String, String>( 2000 );
+        final LRUMap<String, String> map = new LRUMap<>( 2000 );
         suite.addTest( new LRUMapConcurrentUnitTest( "conc1" )
         {
             @Override
@@ -88,7 +88,7 @@ public class LRUMapConcurrentUnitTest
 
         // run more concurrent tests
         final int max2 = 20000;
-        final LRUMap<String, String> map2 = new LRUMap<String, String>( max2 );
+        final LRUMap<String, String> map2 = new LRUMap<>( max2 );
         suite.addTest( new LRUMapConcurrentUnitTest( "concB1" )
         {
             @Override
@@ -120,7 +120,7 @@ public class LRUMapConcurrentUnitTest
     public void testSimpleLoad()
         throws Exception
     {
-        LRUMap<String, String> map = new LRUMap<String, String>( items );
+        LRUMap<String, String> map = new LRUMap<>( items );
 
         for ( int i = 0; i < items; i++ )
         {
@@ -149,7 +149,7 @@ public class LRUMapConcurrentUnitTest
         throws Exception
     {
         int total = 10;
-        LRUMap<String, String> map = new LRUMap<String, String>( total );
+        LRUMap<String, String> map = new LRUMap<>( total );
 
         // put the max in
         for ( int i = 0; i < total; i++ )
@@ -187,7 +187,7 @@ public class LRUMapConcurrentUnitTest
         throws Exception
     {
         int total = 10000;
-        LRUMap<String, String> map = new LRUMap<String, String>( total );
+        LRUMap<String, String> map = new LRUMap<>( total );
 
         // put the max in
         for ( int i = 0; i < total * 2; i++ )

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/LRUMapPerformanceTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/LRUMapPerformanceTest.java?rev=1859859&r1=1859858&r2=1859859&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/LRUMapPerformanceTest.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/LRUMapPerformanceTest.java Fri May 24 09:26:50 2019
@@ -107,7 +107,7 @@ public class LRUMapPerformanceTest
 
         try
         {
-            LRUMap<String, String> cache = new LRUMap<String, String>( tries );
+            LRUMap<String, String> cache = new LRUMap<>( tries );
 
             for ( int j = 0; j < loops; j++ )
             {

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/LRUMapUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/LRUMapUnitTest.java?rev=1859859&r1=1859858&r2=1859859&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/LRUMapUnitTest.java (original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/test/java/org/apache/commons/jcs/utils/struct/LRUMapUnitTest.java Fri May 24 09:26:50 2019
@@ -42,7 +42,7 @@ public class LRUMapUnitTest
     public void testPutWithSizeLimit()
     {
         int size = 10;
-        Map<String, String> cache = new LRUMap<String, String>( size );
+        Map<String, String> cache = new LRUMap<>( size );
 
         for ( int i = 0; i < size; i++ )
         {
@@ -63,7 +63,7 @@ public class LRUMapUnitTest
     public void testPutWithNoSizeLimit()
     {
         int size = 10;
-        Map<String, String> cache = new LRUMap<String, String>( );
+        Map<String, String> cache = new LRUMap<>( );
 
         for ( int i = 0; i < size; i++ )
         {
@@ -84,7 +84,7 @@ public class LRUMapUnitTest
     public void testPutAndRemove()
     {
         int size = 10;
-        Map<String, String> cache = new LRUMap<String, String>( size );
+        Map<String, String> cache = new LRUMap<>( size );
 
         cache.put( "key:" + 1, "data:" + 1 );
         String data = cache.remove( "key:" + 1 );
@@ -98,7 +98,7 @@ public class LRUMapUnitTest
     public void testRemoveEmpty()
     {
         int size = 10;
-        Map<String, String> cache = new LRUMap<String, String>( size );
+        Map<String, String> cache = new LRUMap<>( size );
 
         Object returned = cache.remove( "key:" + 1 );
         assertNull( "Shouldn't hvae anything.", returned );
@@ -112,7 +112,7 @@ public class LRUMapUnitTest
     public void testGetEntrySet()
     {
         int size = 10;
-        Map<String, String> cache = new LRUMap<String, String>( size );
+        Map<String, String> cache = new LRUMap<>( size );
 
         for ( int i = 0; i < size; i++ )
         {