commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [1/9] commons-collections git commit: Remove redundant type arguments.
Date Thu, 27 Jul 2017 06:43:21 GMT
Repository: commons-collections
Updated Branches:
  refs/heads/master f4a63c4c7 -> eef8f1a0a


http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/map/PredicatedMapTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/map/PredicatedMapTest.java b/src/test/java/org/apache/commons/collections4/map/PredicatedMapTest.java
index 23b5567..d5e3ba4 100644
--- a/src/test/java/org/apache/commons/collections4/map/PredicatedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/PredicatedMapTest.java
@@ -94,7 +94,7 @@ public class PredicatedMapTest<K, V> extends AbstractIterableMapTest<K, V> {
         assertTrue(!map.containsKey(Integer.valueOf(3)));
         assertTrue(!map.containsValue(Integer.valueOf(3)));
 
-        final Map<K, V> map2 = new HashMap<K, V>();
+        final Map<K, V> map2 = new HashMap<>();
         map2.put((K) "A", (V) "a");
         map2.put((K) "B", (V) "b");
         map2.put((K) "C", (V) "c");

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/map/PredicatedSortedMapTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/map/PredicatedSortedMapTest.java b/src/test/java/org/apache/commons/collections4/map/PredicatedSortedMapTest.java
index df77bec..307b318 100644
--- a/src/test/java/org/apache/commons/collections4/map/PredicatedSortedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/PredicatedSortedMapTest.java
@@ -108,7 +108,7 @@ public class PredicatedSortedMapTest<K, V> extends AbstractSortedMapTest<K, V> {
         assertTrue(!map.containsKey(Integer.valueOf(3)));
         assertTrue(!map.containsValue(Integer.valueOf(3)));
 
-        final Map<K, V> map2 = new HashMap<K, V>();
+        final Map<K, V> map2 = new HashMap<>();
         map2.put((K) "A", (V) "a");
         map2.put((K) "B", (V) "b");
         map2.put((K) "C", (V) "c");

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/map/ReferenceIdentityMapTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/map/ReferenceIdentityMapTest.java b/src/test/java/org/apache/commons/collections4/map/ReferenceIdentityMapTest.java
index 571a50f..c56dbff 100644
--- a/src/test/java/org/apache/commons/collections4/map/ReferenceIdentityMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/ReferenceIdentityMapTest.java
@@ -48,7 +48,7 @@ public class ReferenceIdentityMapTest<K, V> extends AbstractIterableMapTest<K, V
 
     @Override
     public ReferenceIdentityMap<K, V> makeObject() {
-        return new ReferenceIdentityMap<K, V>(ReferenceStrength.WEAK, ReferenceStrength.WEAK);
+        return new ReferenceIdentityMap<>(ReferenceStrength.WEAK, ReferenceStrength.WEAK);
     }
 
     @Override
@@ -56,7 +56,7 @@ public class ReferenceIdentityMapTest<K, V> extends AbstractIterableMapTest<K, V
         // Testing against another [collections] class generally isn't a good idea,
         // but the closest alternative is IdentityHashMap, which propagates reference-equality down to keySet and values.
         // arguably ReferenceIdentityMap should do the same but that's a later discussion.
-        return new IdentityMap<K, V>();
+        return new IdentityMap<>();
     }
 
     @Override
@@ -88,7 +88,7 @@ public class ReferenceIdentityMapTest<K, V> extends AbstractIterableMapTest<K, V
     //-----------------------------------------------------------------------
     @SuppressWarnings("unchecked")
     public void testBasics() {
-        final IterableMap<K, V> map = new ReferenceIdentityMap<K, V>(ReferenceStrength.HARD, ReferenceStrength.HARD);
+        final IterableMap<K, V> map = new ReferenceIdentityMap<>(ReferenceStrength.HARD, ReferenceStrength.HARD);
         assertEquals(0, map.size());
 
         map.put((K) I1A, (V) I2A);
@@ -122,7 +122,7 @@ public class ReferenceIdentityMapTest<K, V> extends AbstractIterableMapTest<K, V
     //-----------------------------------------------------------------------
     @SuppressWarnings("unchecked")
     public void testHashEntry() {
-        final IterableMap<K, V> map = new ReferenceIdentityMap<K, V>(ReferenceStrength.HARD, ReferenceStrength.HARD);
+        final IterableMap<K, V> map = new ReferenceIdentityMap<>(ReferenceStrength.HARD, ReferenceStrength.HARD);
 
         map.put((K) I1A, (V) I2A);
         map.put((K) I1B, (V) I2A);
@@ -281,10 +281,10 @@ public class ReferenceIdentityMapTest<K, V> extends AbstractIterableMapTest<K, V
         final K key = (K) new Object();
         final V value = (V) new Object();
 
-        keyReference = new WeakReference<K>(key);
-        valueReference = new WeakReference<V>(value);
+        keyReference = new WeakReference<>(key);
+        valueReference = new WeakReference<>(value);
 
-        final Map<K, V> testMap = new ReferenceIdentityMap<K, V>(ReferenceStrength.WEAK, ReferenceStrength.HARD, true);
+        final Map<K, V> testMap = new ReferenceIdentityMap<>(ReferenceStrength.WEAK, ReferenceStrength.HARD, true);
         testMap.put(key, value);
 
         assertEquals("In map", value, testMap.get(key));

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java b/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java
index 5589517..dec5418 100644
--- a/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java
@@ -41,7 +41,7 @@ public class ReferenceMapTest<K, V> extends AbstractIterableMapTest<K, V> {
 
     @Override
     public ReferenceMap<K, V> makeObject() {
-        return new ReferenceMap<K, V>(ReferenceStrength.WEAK, ReferenceStrength.WEAK);
+        return new ReferenceMap<>(ReferenceStrength.WEAK, ReferenceStrength.WEAK);
     }
 
     @Override
@@ -214,10 +214,10 @@ public class ReferenceMapTest<K, V> extends AbstractIterableMapTest<K, V> {
         final K key = (K) new Object();
         final V value = (V) new Object();
 
-        keyReference = new WeakReference<K>(key);
-        valueReference = new WeakReference<V>(value);
+        keyReference = new WeakReference<>(key);
+        valueReference = new WeakReference<>(value);
 
-        final Map<K, V> testMap = new ReferenceMap<K, V>(ReferenceStrength.WEAK, ReferenceStrength.HARD, true);
+        final Map<K, V> testMap = new ReferenceMap<>(ReferenceStrength.WEAK, ReferenceStrength.HARD, true);
         testMap.put(key, value);
 
         assertEquals("In map", value, testMap.get(key));

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/map/SingletonMapTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/map/SingletonMapTest.java b/src/test/java/org/apache/commons/collections4/map/SingletonMapTest.java
index 2910eae..e28d89b 100644
--- a/src/test/java/org/apache/commons/collections4/map/SingletonMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/SingletonMapTest.java
@@ -64,7 +64,7 @@ public class SingletonMapTest<K, V> extends AbstractOrderedMapTest<K, V> {
     @Override
     @SuppressWarnings("unchecked")
     public SingletonMap<K, V> makeFullMap() {
-        return new SingletonMap<K, V>((K) ONE, (V) TWO);
+        return new SingletonMap<>((K) ONE, (V) TWO);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/map/StaticBucketMapTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/map/StaticBucketMapTest.java b/src/test/java/org/apache/commons/collections4/map/StaticBucketMapTest.java
index 663f8c6..47bfef8 100644
--- a/src/test/java/org/apache/commons/collections4/map/StaticBucketMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/StaticBucketMapTest.java
@@ -38,7 +38,7 @@ public class StaticBucketMapTest<K, V> extends AbstractIterableMapTest<K, V> {
 
     @Override
     public StaticBucketMap<K, V> makeObject() {
-        return new StaticBucketMap<K, V>(30);
+        return new StaticBucketMap<>(30);
     }
 
     /**
@@ -63,7 +63,7 @@ public class StaticBucketMapTest<K, V> extends AbstractIterableMapTest<K, V> {
     // Bugzilla 37567
     @SuppressWarnings("unchecked")
     public void test_get_nullMatchesIncorrectly() {
-        final StaticBucketMap<K, V> map = new StaticBucketMap<K, V>(17);
+        final StaticBucketMap<K, V> map = new StaticBucketMap<>(17);
         map.put(null, (V) "A");
         assertEquals("A", map.get(null));
         // loop so we find a string that is in the same bucket as the null
@@ -75,7 +75,7 @@ public class StaticBucketMapTest<K, V> extends AbstractIterableMapTest<K, V> {
 
     @SuppressWarnings("unchecked")
     public void test_containsKey_nullMatchesIncorrectly() {
-        final StaticBucketMap<K, V> map = new StaticBucketMap<K, V>(17);
+        final StaticBucketMap<K, V> map = new StaticBucketMap<>(17);
         map.put(null, (V) "A");
         assertEquals(true, map.containsKey(null));
         // loop so we find a string that is in the same bucket as the null
@@ -87,7 +87,7 @@ public class StaticBucketMapTest<K, V> extends AbstractIterableMapTest<K, V> {
 
     @SuppressWarnings("unchecked")
     public void test_containsValue_nullMatchesIncorrectly() {
-        final StaticBucketMap<K, V> map = new StaticBucketMap<K, V>(17);
+        final StaticBucketMap<K, V> map = new StaticBucketMap<>(17);
         map.put((K) "A", null);
         assertEquals(true, map.containsValue(null));
         // loop so we find a string that is in the same bucket as the null

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/map/TransformedMapTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/map/TransformedMapTest.java b/src/test/java/org/apache/commons/collections4/map/TransformedMapTest.java
index e3c1871..7837a77 100644
--- a/src/test/java/org/apache/commons/collections4/map/TransformedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/TransformedMapTest.java
@@ -98,7 +98,7 @@ public class TransformedMapTest<K, V> extends AbstractIterableMapTest<K, V> {
     //-----------------------------------------------------------------------
     @SuppressWarnings("unchecked")
     public void testFactory_Decorate() {
-        final Map<K, V> base = new HashMap<K, V>();
+        final Map<K, V> base = new HashMap<>();
         base.put((K) "A", (V) "1");
         base.put((K) "B", (V) "2");
         base.put((K) "C", (V) "3");
@@ -118,7 +118,7 @@ public class TransformedMapTest<K, V> extends AbstractIterableMapTest<K, V> {
 
     @SuppressWarnings("unchecked")
     public void testFactory_decorateTransform() {
-        final Map<K, V> base = new HashMap<K, V>();
+        final Map<K, V> base = new HashMap<>();
         base.put((K) "A", (V) "1");
         base.put((K) "B", (V) "2");
         base.put((K) "C", (V) "3");

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/map/TransformedSortedMapTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/map/TransformedSortedMapTest.java b/src/test/java/org/apache/commons/collections4/map/TransformedSortedMapTest.java
index ab02f7a..cfafb25 100644
--- a/src/test/java/org/apache/commons/collections4/map/TransformedSortedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/TransformedSortedMapTest.java
@@ -144,7 +144,7 @@ public class TransformedSortedMapTest<K, V> extends AbstractSortedMapTest<K, V>
     //-----------------------------------------------------------------------
     @SuppressWarnings("unchecked")
     public void testFactory_Decorate() {
-        final SortedMap<K, V> base = new TreeMap<K, V>();
+        final SortedMap<K, V> base = new TreeMap<>();
         base.put((K) "A", (V) "1");
         base.put((K) "B", (V) "2");
         base.put((K) "C", (V) "3");
@@ -164,7 +164,7 @@ public class TransformedSortedMapTest<K, V> extends AbstractSortedMapTest<K, V>
 
     @SuppressWarnings("unchecked")
     public void testFactory_decorateTransform() {
-        final SortedMap<K, V> base = new TreeMap<K, V>();
+        final SortedMap<K, V> base = new TreeMap<>();
         base.put((K) "A", (V) "1");
         base.put((K) "B", (V) "2");
         base.put((K) "C", (V) "3");

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/map/UnmodifiableMapTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/map/UnmodifiableMapTest.java b/src/test/java/org/apache/commons/collections4/map/UnmodifiableMapTest.java
index cabf3f0..d23ae1e 100644
--- a/src/test/java/org/apache/commons/collections4/map/UnmodifiableMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/UnmodifiableMapTest.java
@@ -59,7 +59,7 @@ public class UnmodifiableMapTest<K, V> extends AbstractIterableMapTest<K, V> {
 
     @Override
     public IterableMap<K, V> makeFullMap() {
-        final Map<K, V> m = new HashMap<K, V>();
+        final Map<K, V> m = new HashMap<>();
         addSampleMappings(m);
         return (IterableMap<K, V>) UnmodifiableMap.unmodifiableMap(m);
     }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/map/UnmodifiableSortedMapTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/map/UnmodifiableSortedMapTest.java b/src/test/java/org/apache/commons/collections4/map/UnmodifiableSortedMapTest.java
index b50b903..b3ce216 100644
--- a/src/test/java/org/apache/commons/collections4/map/UnmodifiableSortedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/UnmodifiableSortedMapTest.java
@@ -58,7 +58,7 @@ public class UnmodifiableSortedMapTest<K, V> extends AbstractSortedMapTest<K, V>
 
     @Override
     public SortedMap<K, V> makeFullMap() {
-        final SortedMap<K, V> m = new TreeMap<K, V>();
+        final SortedMap<K, V> m = new TreeMap<>();
         addSampleMappings(m);
         return UnmodifiableSortedMap.unmodifiableSortedMap(m);
     }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java b/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java
index 79c15b7..9e350d0 100644
--- a/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java
@@ -162,7 +162,7 @@ public abstract class AbstractMultiValuedMapTest<K, V> extends AbstractObjectTes
      * @return a MultiValuedMap that is known to be valid
      */
     public MultiValuedMap<K, V> makeConfirmedMap() {
-        return new ArrayListValuedHashMap<K, V>();
+        return new ArrayListValuedHashMap<>();
     }
 
     public MultiValuedMap<K, V> getConfirmed() {
@@ -317,7 +317,7 @@ public abstract class AbstractMultiValuedMapTest<K, V> extends AbstractObjectTes
     @SuppressWarnings("unchecked")
     public void testValues() {
         final MultiValuedMap<K, V> map = makeFullMap();
-        final HashSet<V> expected = new HashSet<V>();
+        final HashSet<V> expected = new HashSet<>();
         expected.add((V) "uno");
         expected.add((V) "dos");
         expected.add((V) "tres");
@@ -326,7 +326,7 @@ public abstract class AbstractMultiValuedMapTest<K, V> extends AbstractObjectTes
         expected.add((V) "trois");
         final Collection<V> c = map.values();
         assertEquals(6, c.size());
-        assertEquals(expected, new HashSet<V>(c));
+        assertEquals(expected, new HashSet<>(c));
     }
 
 //    public void testKeyedIterator() {
@@ -389,7 +389,7 @@ public abstract class AbstractMultiValuedMapTest<K, V> extends AbstractObjectTes
 
     public void testEntriesCollectionIterator() {
         final MultiValuedMap<K, V> map = makeFullMap();
-        Collection<V> values = new ArrayList<V>(map.values());
+        Collection<V> values = new ArrayList<>(map.values());
         Iterator<Map.Entry<K, V>> iterator = map.entries().iterator();
         while (iterator.hasNext()) {
             Map.Entry<K, V> entry = iterator.next();
@@ -560,7 +560,7 @@ public abstract class AbstractMultiValuedMapTest<K, V> extends AbstractObjectTes
         if (!isAddSupported()) {
             return;
         }
-        final Map<K, V> original = new HashMap<K, V>();
+        final Map<K, V> original = new HashMap<>();
         original.put((K) "keyX", (V) "object1");
         original.put((K) "keyY", (V) "object2");
 
@@ -649,12 +649,12 @@ public abstract class AbstractMultiValuedMapTest<K, V> extends AbstractObjectTes
 
     public void testKeysBagIterator() {
         MultiValuedMap<K, V> map = makeFullMap();
-        Collection<K> col = new ArrayList<K>();
+        Collection<K> col = new ArrayList<>();
         Iterator<K> it = map.keys().iterator();
         while (it.hasNext()) {
             col.add(it.next());
         }
-        Bag<K> bag = new HashBag<K>(col);
+        Bag<K> bag = new HashBag<>(col);
         assertEquals(2, bag.getCount("one"));
         assertEquals(2, bag.getCount("two"));
         assertEquals(2, bag.getCount("three"));
@@ -1092,7 +1092,7 @@ public abstract class AbstractMultiValuedMapTest<K, V> extends AbstractObjectTes
             Collection<V>[] colArr = new Collection[3];
             for(int i = 0; i < 3; i++) {
                 Collection<V> coll = Arrays.asList(sampleValues[i*2], sampleValues[i*2 + 1]);
-                colArr[i] = isSetValuedMap ? new HashSet<V>(coll) : coll;
+                colArr[i] = isSetValuedMap ? new HashSet<>(coll) : coll;
             }
             return colArr;
         }
@@ -1105,7 +1105,7 @@ public abstract class AbstractMultiValuedMapTest<K, V> extends AbstractObjectTes
             Collection<V>[] colArr = new Collection[3];
             for (int i = 0; i < 3; i++) {
                 Collection<V> coll = Arrays.asList((V) sampleValues[i * 2], (V) sampleValues[i * 2 + 1]);
-                colArr[i] = isSetValuedMap ? new HashSet<V>(coll) : coll;
+                colArr[i] = isSetValuedMap ? new HashSet<>(coll) : coll;
             }
             return colArr;
         }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMapTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMapTest.java b/src/test/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMapTest.java
index 3bec075..883b87a 100644
--- a/src/test/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMapTest.java
@@ -44,7 +44,7 @@ public class ArrayListValuedHashMapTest<K, V> extends AbstractMultiValuedMapTest
     // -----------------------------------------------------------------------
     @Override
     public ListValuedMap<K, V> makeObject() {
-        return new ArrayListValuedHashMap<K, V>();
+        return new ArrayListValuedHashMap<>();
     }
 
     // -----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/multimap/HashSetValuedHashMapTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/multimap/HashSetValuedHashMapTest.java b/src/test/java/org/apache/commons/collections4/multimap/HashSetValuedHashMapTest.java
index b8c29b6..fc31bad 100644
--- a/src/test/java/org/apache/commons/collections4/multimap/HashSetValuedHashMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/multimap/HashSetValuedHashMapTest.java
@@ -44,12 +44,12 @@ public class HashSetValuedHashMapTest<K, V> extends AbstractMultiValuedMapTest<K
     // -----------------------------------------------------------------------
     @Override
     public SetValuedMap<K, V> makeObject() {
-        return new HashSetValuedHashMap<K, V>();
+        return new HashSetValuedHashMap<>();
     }
 
     @Override
     public MultiValuedMap<K, V> makeConfirmedMap() {
-        return new HashSetValuedHashMap<K, V>();
+        return new HashSetValuedHashMap<>();
     }
 
     // -----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMapTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMapTest.java b/src/test/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMapTest.java
index 2d4e8e3..70e068f 100644
--- a/src/test/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMapTest.java
@@ -96,7 +96,7 @@ public class TransformedMultiValuedMapTest<K, V> extends AbstractMultiValuedMapT
     // -----------------------------------------------------------------------
     @SuppressWarnings("unchecked")
     public void testFactory_Decorate() {
-        final MultiValuedMap<K, V> base = new ArrayListValuedHashMap<K, V>();
+        final MultiValuedMap<K, V> base = new ArrayListValuedHashMap<>();
         base.put((K) "A", (V) "1");
         base.put((K) "B", (V) "2");
         base.put((K) "C", (V) "3");
@@ -116,7 +116,7 @@ public class TransformedMultiValuedMapTest<K, V> extends AbstractMultiValuedMapT
 
     @SuppressWarnings("unchecked")
     public void testFactory_decorateTransform() {
-        final MultiValuedMap<K, V> base = new ArrayListValuedHashMap<K, V>();
+        final MultiValuedMap<K, V> base = new ArrayListValuedHashMap<>();
         base.put((K) "A", (V) "1");
         base.put((K) "B", (V) "2");
         base.put((K) "C", (V) "3");

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMapTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMapTest.java b/src/test/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMapTest.java
index 633af67..1379d5a 100644
--- a/src/test/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMapTest.java
@@ -66,7 +66,7 @@ public class UnmodifiableMultiValuedMapTest<K, V> extends AbstractMultiValuedMap
 
     @Override
     protected MultiValuedMap<K, V> makeFullMap() {
-        final MultiValuedMap<K, V> map = new ArrayListValuedHashMap<K, V>();
+        final MultiValuedMap<K, V> map = new ArrayListValuedHashMap<>();
         addSampleMappings(map);
         return UnmodifiableMultiValuedMap.<K, V> unmodifiableMultiValuedMap(map);
     }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/multiset/AbstractMultiSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/multiset/AbstractMultiSetTest.java b/src/test/java/org/apache/commons/collections4/multiset/AbstractMultiSetTest.java
index 67ef700..dde3c40 100644
--- a/src/test/java/org/apache/commons/collections4/multiset/AbstractMultiSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/multiset/AbstractMultiSetTest.java
@@ -73,7 +73,7 @@ public abstract class AbstractMultiSetTest<T> extends AbstractCollectionTest<T>
      */
     @Override
     public Collection<T> makeConfirmedCollection() {
-        final ArrayList<T> list = new ArrayList<T>();
+        final ArrayList<T> list = new ArrayList<>();
         return list;
     }
 
@@ -202,7 +202,7 @@ public abstract class AbstractMultiSetTest<T> extends AbstractCollectionTest<T>
         multiset.add((T) "B");
         multiset.add((T) "C");
         assertEquals("Should have count of 4", 4, multiset.size());
-        final List<String> delete = new ArrayList<String>();
+        final List<String> delete = new ArrayList<>();
         delete.add("A");
         delete.add("B");
         multiset.removeAll(delete);
@@ -243,15 +243,15 @@ public abstract class AbstractMultiSetTest<T> extends AbstractCollectionTest<T>
         }
         
         final MultiSet<T> multiset = makeObject();
-        final List<String> known = new ArrayList<String>();
-        final List<String> known1A = new ArrayList<String>();
+        final List<String> known = new ArrayList<>();
+        final List<String> known1A = new ArrayList<>();
         known1A.add("A");
-        final List<String> known2A = new ArrayList<String>();
+        final List<String> known2A = new ArrayList<>();
         known2A.add("A");
         known2A.add("A");
-        final List<String> known1B = new ArrayList<String>();
+        final List<String> known1B = new ArrayList<>();
         known1B.add("B");
-        final List<String> known1A1B = new ArrayList<String>();
+        final List<String> known1A1B = new ArrayList<>();
         known1A1B.add("A");
         known1A1B.add("B");
 
@@ -328,7 +328,7 @@ public abstract class AbstractMultiSetTest<T> extends AbstractCollectionTest<T>
         multiset.add((T) "B");
         multiset.add((T) "B");
         multiset.add((T) "C");
-        final List<String> retains = new ArrayList<String>();
+        final List<String> retains = new ArrayList<>();
         retains.add("B");
         retains.add("C");
         multiset.retainAll(retains);
@@ -543,7 +543,7 @@ public abstract class AbstractMultiSetTest<T> extends AbstractCollectionTest<T>
         }
 
         final MultiSet<T> multiset = makeObject();
-        final MultiSet<T> multiset2 = new HashMultiSet<T>();
+        final MultiSet<T> multiset2 = new HashMultiSet<>();
         assertEquals(true, multiset.equals(multiset2));
         multiset.add((T) "A");
         assertEquals(false, multiset.equals(multiset2));
@@ -654,14 +654,14 @@ public abstract class AbstractMultiSetTest<T> extends AbstractCollectionTest<T>
         public void resetEmpty() {
             AbstractMultiSetTest.this.resetEmpty();
             TestMultiSetUniqueSet.this.setCollection(AbstractMultiSetTest.this.getCollection().uniqueSet());
-            TestMultiSetUniqueSet.this.setConfirmed(new HashSet<T>(AbstractMultiSetTest.this.getConfirmed()));
+            TestMultiSetUniqueSet.this.setConfirmed(new HashSet<>(AbstractMultiSetTest.this.getConfirmed()));
         }
 
         @Override
         public void resetFull() {
             AbstractMultiSetTest.this.resetFull();
             TestMultiSetUniqueSet.this.setCollection(AbstractMultiSetTest.this.getCollection().uniqueSet());
-            TestMultiSetUniqueSet.this.setConfirmed(new HashSet<T>(AbstractMultiSetTest.this.getConfirmed()));
+            TestMultiSetUniqueSet.this.setConfirmed(new HashSet<>(AbstractMultiSetTest.this.getConfirmed()));
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/multiset/HashMultiSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/multiset/HashMultiSetTest.java b/src/test/java/org/apache/commons/collections4/multiset/HashMultiSetTest.java
index 5e7a094..bee9c4c 100644
--- a/src/test/java/org/apache/commons/collections4/multiset/HashMultiSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/multiset/HashMultiSetTest.java
@@ -42,7 +42,7 @@ public class HashMultiSetTest<T> extends AbstractMultiSetTest<T> {
 
     @Override
     public MultiSet<T> makeObject() {
-        return new HashMultiSet<T>();
+        return new HashMultiSet<>();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/multiset/PredicatedMultiSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/multiset/PredicatedMultiSetTest.java b/src/test/java/org/apache/commons/collections4/multiset/PredicatedMultiSetTest.java
index 656b959..75bff53 100644
--- a/src/test/java/org/apache/commons/collections4/multiset/PredicatedMultiSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/multiset/PredicatedMultiSetTest.java
@@ -104,7 +104,7 @@ public class PredicatedMultiSetTest<T> extends AbstractMultiSetTest<T> {
 
     @SuppressWarnings("unchecked")
     public void testIllegalDecorate() {
-        final HashMultiSet<Object> elements = new HashMultiSet<Object>();
+        final HashMultiSet<Object> elements = new HashMultiSet<>();
         elements.add("one");
         elements.add("two");
         elements.add(Integer.valueOf(3));

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSetTest.java b/src/test/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSetTest.java
index 79c8700..5ef4fcf 100644
--- a/src/test/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSetTest.java
@@ -49,7 +49,7 @@ public class UnmodifiableMultiSetTest<E> extends AbstractMultiSetTest<E> {
 
     @Override
     public MultiSet<E> makeFullCollection() {
-        final MultiSet<E> multiset = new HashMultiSet<E>();
+        final MultiSet<E> multiset = new HashMultiSet<>();
         multiset.addAll(Arrays.asList(getFullElements()));
         return UnmodifiableMultiSet.unmodifiableMultiSet(multiset);
     }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/queue/AbstractQueueTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/queue/AbstractQueueTest.java b/src/test/java/org/apache/commons/collections4/queue/AbstractQueueTest.java
index e86ace2..5cf4029 100644
--- a/src/test/java/org/apache/commons/collections4/queue/AbstractQueueTest.java
+++ b/src/test/java/org/apache/commons/collections4/queue/AbstractQueueTest.java
@@ -87,7 +87,7 @@ public abstract class AbstractQueueTest<E> extends AbstractCollectionTest<E> {
      */
     @Override
     public Collection<E> makeConfirmedCollection() {
-        final ArrayList<E> list = new ArrayList<E>();
+        final ArrayList<E> list = new ArrayList<>();
         return list;
     }
 
@@ -96,7 +96,7 @@ public abstract class AbstractQueueTest<E> extends AbstractCollectionTest<E> {
      */
     @Override
     public Collection<E> makeConfirmedFullCollection() {
-        final ArrayList<E> list = new ArrayList<E>();
+        final ArrayList<E> list = new ArrayList<>();
         list.addAll(Arrays.asList(getFullElements()));
         return list;
     }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/queue/CircularFifoQueueTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/queue/CircularFifoQueueTest.java b/src/test/java/org/apache/commons/collections4/queue/CircularFifoQueueTest.java
index e3fe654..f2b0edc 100644
--- a/src/test/java/org/apache/commons/collections4/queue/CircularFifoQueueTest.java
+++ b/src/test/java/org/apache/commons/collections4/queue/CircularFifoQueueTest.java
@@ -84,7 +84,7 @@ public class CircularFifoQueueTest<E> extends AbstractQueueTest<E> {
      */
     @Override
     public Collection<E> makeConfirmedCollection() {
-        return new ArrayList<E>();
+        return new ArrayList<>();
     }
 
     /**
@@ -106,7 +106,7 @@ public class CircularFifoQueueTest<E> extends AbstractQueueTest<E> {
      */
     @Override
     public Queue<E> makeObject() {
-        return new CircularFifoQueue<E>(100);
+        return new CircularFifoQueue<>(100);
     }
 
     //-----------------------------------------------------------------------
@@ -115,11 +115,11 @@ public class CircularFifoQueueTest<E> extends AbstractQueueTest<E> {
      */
     @SuppressWarnings("unchecked")
     public void testCircularFifoQueueCircular() {
-        final List<E> list = new ArrayList<E>();
+        final List<E> list = new ArrayList<>();
         list.add((E) "A");
         list.add((E) "B");
         list.add((E) "C");
-        final Queue<E> queue = new CircularFifoQueue<E>(list);
+        final Queue<E> queue = new CircularFifoQueue<>(list);
 
         assertEquals(true, queue.contains("A"));
         assertEquals(true, queue.contains("B"));
@@ -198,7 +198,7 @@ public class CircularFifoQueueTest<E> extends AbstractQueueTest<E> {
     @SuppressWarnings("unchecked")
     public void testRemoveError1() throws Exception {
         // based on bug 33071
-        final CircularFifoQueue<E> fifo = new CircularFifoQueue<E>(5);
+        final CircularFifoQueue<E> fifo = new CircularFifoQueue<>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -217,7 +217,7 @@ public class CircularFifoQueueTest<E> extends AbstractQueueTest<E> {
     @SuppressWarnings("unchecked")
     public void testRemoveError2() throws Exception {
         // based on bug 33071
-        final CircularFifoQueue<E> fifo = new CircularFifoQueue<E>(5);
+        final CircularFifoQueue<E> fifo = new CircularFifoQueue<>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -238,7 +238,7 @@ public class CircularFifoQueueTest<E> extends AbstractQueueTest<E> {
     @SuppressWarnings("unchecked")
     public void testRemoveError3() throws Exception {
         // based on bug 33071
-        final CircularFifoQueue<E> fifo = new CircularFifoQueue<E>(5);
+        final CircularFifoQueue<E> fifo = new CircularFifoQueue<>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -261,7 +261,7 @@ public class CircularFifoQueueTest<E> extends AbstractQueueTest<E> {
     @SuppressWarnings("unchecked")
     public void testRemoveError4() throws Exception {
         // based on bug 33071
-        final CircularFifoQueue<E> fifo = new CircularFifoQueue<E>(5);
+        final CircularFifoQueue<E> fifo = new CircularFifoQueue<>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -279,7 +279,7 @@ public class CircularFifoQueueTest<E> extends AbstractQueueTest<E> {
     @SuppressWarnings("unchecked")
     public void testRemoveError5() throws Exception {
         // based on bug 33071
-        final CircularFifoQueue<E> fifo = new CircularFifoQueue<E>(5);
+        final CircularFifoQueue<E> fifo = new CircularFifoQueue<>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -297,7 +297,7 @@ public class CircularFifoQueueTest<E> extends AbstractQueueTest<E> {
     @SuppressWarnings("unchecked")
     public void testRemoveError6() throws Exception {
         // based on bug 33071
-        final CircularFifoQueue<E> fifo = new CircularFifoQueue<E>(5);
+        final CircularFifoQueue<E> fifo = new CircularFifoQueue<>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -315,7 +315,7 @@ public class CircularFifoQueueTest<E> extends AbstractQueueTest<E> {
     @SuppressWarnings("unchecked")
     public void testRemoveError7() throws Exception {
         // based on bug 33071
-        final CircularFifoQueue<E> fifo = new CircularFifoQueue<E>(5);
+        final CircularFifoQueue<E> fifo = new CircularFifoQueue<>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -333,7 +333,7 @@ public class CircularFifoQueueTest<E> extends AbstractQueueTest<E> {
     @SuppressWarnings("unchecked")
     public void testRemoveError8() throws Exception {
         // based on bug 33071
-        final CircularFifoQueue<E> fifo = new CircularFifoQueue<E>(5);
+        final CircularFifoQueue<E> fifo = new CircularFifoQueue<>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -352,7 +352,7 @@ public class CircularFifoQueueTest<E> extends AbstractQueueTest<E> {
     @SuppressWarnings("unchecked")
     public void testRemoveError9() throws Exception {
         // based on bug 33071
-        final CircularFifoQueue<E> fifo = new CircularFifoQueue<E>(5);
+        final CircularFifoQueue<E> fifo = new CircularFifoQueue<>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -372,7 +372,7 @@ public class CircularFifoQueueTest<E> extends AbstractQueueTest<E> {
     @SuppressWarnings("unchecked")
     public void testRepeatedSerialization() throws Exception {
         // bug 31433
-        final CircularFifoQueue<E> b = new CircularFifoQueue<E>(2);
+        final CircularFifoQueue<E> b = new CircularFifoQueue<>(2);
         b.add((E) "a");
         assertEquals(1, b.size());
         assertEquals(true, b.contains("a"));

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/queue/PredicatedQueueTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/queue/PredicatedQueueTest.java b/src/test/java/org/apache/commons/collections4/queue/PredicatedQueueTest.java
index 5171e4a..3f02796 100644
--- a/src/test/java/org/apache/commons/collections4/queue/PredicatedQueueTest.java
+++ b/src/test/java/org/apache/commons/collections4/queue/PredicatedQueueTest.java
@@ -54,19 +54,19 @@ public class PredicatedQueueTest<E> extends AbstractQueueTest<E> {
 
     @Override
     public Queue<E> makeFullCollection() {
-        final Queue<E> queue = new LinkedList<E>();
+        final Queue<E> queue = new LinkedList<>();
         queue.addAll(Arrays.asList(getFullElements()));
         return decorateCollection(queue, truePredicate);
     }
 
     @Override
     public Collection<E> makeConfirmedCollection() {
-        return new LinkedList<E>();
+        return new LinkedList<>();
     }
 
     @Override
     public Collection<E> makeConfirmedFullCollection() {
-        final List<E> list = new LinkedList<E>();
+        final List<E> list = new LinkedList<>();
         list.addAll(Arrays.asList(getFullElements()));
         return list;
     }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/queue/TransformedQueueTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/queue/TransformedQueueTest.java b/src/test/java/org/apache/commons/collections4/queue/TransformedQueueTest.java
index a96958e..5b01462 100644
--- a/src/test/java/org/apache/commons/collections4/queue/TransformedQueueTest.java
+++ b/src/test/java/org/apache/commons/collections4/queue/TransformedQueueTest.java
@@ -41,12 +41,12 @@ public class TransformedQueueTest<E> extends AbstractQueueTest<E> {
     //-----------------------------------------------------------------------
     @Override
     public Queue<E> makeConfirmedCollection() {
-        return new LinkedList<E>();
+        return new LinkedList<>();
     }
 
     @Override
     public Queue<E> makeConfirmedFullCollection() {
-        final Queue<E> list = new LinkedList<E>();
+        final Queue<E> list = new LinkedList<>();
         list.addAll(Arrays.asList(getFullElements()));
         return list;
     }
@@ -61,14 +61,14 @@ public class TransformedQueueTest<E> extends AbstractQueueTest<E> {
     @Override
     @SuppressWarnings("unchecked")
     public Queue<E> makeFullCollection() {
-        final Queue<E> list = new LinkedList<E>();
+        final Queue<E> list = new LinkedList<>();
         list.addAll(Arrays.asList(getFullElements()));
         return TransformedQueue.transformingQueue(list, (Transformer<E, E>) TransformedCollectionTest.NOOP_TRANSFORMER);
     }
 
     //-----------------------------------------------------------------------
     public void testTransformedQueue() {
-        final Queue<Object> queue = TransformedQueue.transformingQueue(new LinkedList<Object>(),
+        final Queue<Object> queue = TransformedQueue.transformingQueue(new LinkedList<>(),
                 TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER);
         assertEquals(0, queue.size());
         final Object[] elements = new Object[] { "1", "3", "5", "7", "2", "4", "6" };

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/queue/UnmodifiableQueueTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/queue/UnmodifiableQueueTest.java b/src/test/java/org/apache/commons/collections4/queue/UnmodifiableQueueTest.java
index 5fe8d48..1f1d96a 100644
--- a/src/test/java/org/apache/commons/collections4/queue/UnmodifiableQueueTest.java
+++ b/src/test/java/org/apache/commons/collections4/queue/UnmodifiableQueueTest.java
@@ -45,19 +45,19 @@ public class UnmodifiableQueueTest<E> extends AbstractQueueTest<E> {
 
     @Override
     public Queue<E> makeFullCollection() {
-        final Queue<E> queue = new LinkedList<E>();
+        final Queue<E> queue = new LinkedList<>();
         queue.addAll(Arrays.asList(getFullElements()));
         return UnmodifiableQueue.unmodifiableQueue(queue);
     }
 
     @Override
     public Collection<E> makeConfirmedCollection() {
-        return new LinkedList<E>();
+        return new LinkedList<>();
     }
 
     @Override
     public Collection<E> makeConfirmedFullCollection() {
-        final LinkedList<E> list = new LinkedList<E>();
+        final LinkedList<E> list = new LinkedList<>();
         list.addAll(Arrays.asList(getFullElements()));
         return list;
     }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/sequence/SequencesComparatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/sequence/SequencesComparatorTest.java b/src/test/java/org/apache/commons/collections4/sequence/SequencesComparatorTest.java
index 63c90b9..f2795ec 100644
--- a/src/test/java/org/apache/commons/collections4/sequence/SequencesComparatorTest.java
+++ b/src/test/java/org/apache/commons/collections4/sequence/SequencesComparatorTest.java
@@ -36,7 +36,7 @@ public class SequencesComparatorTest {
     public void testLength() {
         for (int i = 0; i < before.size(); ++i) {
             final SequencesComparator<Character> comparator =
-                    new SequencesComparator<Character>(sequence(before.get(i)),
+                    new SequencesComparator<>(sequence(before.get(i)),
                             sequence(after.get(i)));
             Assert.assertEquals(length[i], comparator.getScript().getModifications());
         }
@@ -44,10 +44,10 @@ public class SequencesComparatorTest {
 
     @Test
     public void testExecution() {
-        final ExecutionVisitor<Character> ev = new ExecutionVisitor<Character>();
+        final ExecutionVisitor<Character> ev = new ExecutionVisitor<>();
         for (int i = 0; i < before.size(); ++i) {
             ev.setList(sequence(before.get(i)));
-            new SequencesComparator<Character>(sequence(before.get(i)),
+            new SequencesComparator<>(sequence(before.get(i)),
                     sequence(after.get(i))).getScript().visit(ev);
             Assert.assertEquals(after.get(i), ev.getString());
         }
@@ -61,8 +61,8 @@ public class SequencesComparatorTest {
             new String("ZO"),
             new String("MEU")
         };
-        final List<String> sentenceBefore = new ArrayList<String>();
-        final List<String> sentenceAfter  = new ArrayList<String>();
+        final List<String> sentenceBefore = new ArrayList<>();
+        final List<String> sentenceAfter  = new ArrayList<>();
         sentenceBefore.add(shadokAlph[0]);
         sentenceBefore.add(shadokAlph[2]);
         sentenceBefore.add(shadokAlph[3]);
@@ -99,7 +99,7 @@ public class SequencesComparatorTest {
             }
 
             final SequencesComparator<String> comparator =
-                    new SequencesComparator<String>(sentenceBefore, sentenceAfter);
+                    new SequencesComparator<>(sentenceBefore, sentenceAfter);
             Assert.assertTrue(comparator.getScript().getModifications() <= nbCom);
         }
     }
@@ -113,13 +113,13 @@ public class SequencesComparatorTest {
             new String("ZO"),
             new String("MEU")
         };
-        List<List<String>> shadokSentences = new ArrayList<List<String>>();
+        List<List<String>> shadokSentences = new ArrayList<>();
         for (int lg=0; lg<lgMax; ++lg) {
-            final List<List<String>> newTab = new ArrayList<List<String>>();
+            final List<List<String>> newTab = new ArrayList<>();
             newTab.add(new ArrayList<String>());
             for (final String element : shadokAlph) {
                 for (final List<String> sentence : shadokSentences) {
-                    final List<String> newSentence = new ArrayList<String>(sentence);
+                    final List<String> newSentence = new ArrayList<>(sentence);
                     newSentence.add(element);
                     newTab.add(newSentence);
                 }
@@ -127,12 +127,12 @@ public class SequencesComparatorTest {
             shadokSentences = newTab;
         }
 
-        final ExecutionVisitor<String> ev = new ExecutionVisitor<String>();
+        final ExecutionVisitor<String> ev = new ExecutionVisitor<>();
 
         for (int i = 0; i < shadokSentences.size(); ++i) {
             for (List<String> shadokSentence : shadokSentences) {
                 ev.setList(shadokSentences.get(i));
-                new SequencesComparator<String>(shadokSentences.get(i),
+                new SequencesComparator<>(shadokSentences.get(i),
                         shadokSentence).getScript().visit(ev);
 
                 final StringBuilder concat = new StringBuilder();
@@ -145,7 +145,7 @@ public class SequencesComparatorTest {
     }
 
     private List<Character> sequence(final String string) {
-        final List<Character> list = new ArrayList<Character>();
+        final List<Character> list = new ArrayList<>();
         for (int i = 0; i < string.length(); ++i) {
             list.add(new Character(string.charAt(i)));
         }
@@ -158,7 +158,7 @@ public class SequencesComparatorTest {
         private int index;
 
         public void setList(final List<T> array) {
-            v = new ArrayList<T>(array);
+            v = new ArrayList<>(array);
             index = 0;
         }
 

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/set/AbstractNavigableSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/set/AbstractNavigableSetTest.java b/src/test/java/org/apache/commons/collections4/set/AbstractNavigableSetTest.java
index 62bcd2f..927719f 100644
--- a/src/test/java/org/apache/commons/collections4/set/AbstractNavigableSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/set/AbstractNavigableSetTest.java
@@ -67,7 +67,7 @@ public abstract class AbstractNavigableSetTest<E> extends AbstractSortedSetTest<
      */
     @Override
     public NavigableSet<E> makeConfirmedCollection() {
-        return new TreeSet<E>();
+        return new TreeSet<>();
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java b/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java
index 1b0b658..da1f750 100644
--- a/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java
@@ -84,7 +84,7 @@ public abstract class AbstractSetTest<E> extends AbstractCollectionTest<E> {
      */
     @Override
     public Collection<E> makeConfirmedCollection() {
-        return new HashSet<E>();
+        return new HashSet<>();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/set/AbstractSortedSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/set/AbstractSortedSetTest.java b/src/test/java/org/apache/commons/collections4/set/AbstractSortedSetTest.java
index 1250583..e0bc53c 100644
--- a/src/test/java/org/apache/commons/collections4/set/AbstractSortedSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/set/AbstractSortedSetTest.java
@@ -108,7 +108,7 @@ public abstract class AbstractSortedSetTest<E> extends AbstractSetTest<E> {
      */
     @Override
     public SortedSet<E> makeConfirmedCollection() {
-        return new TreeSet<E>();
+        return new TreeSet<>();
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/set/CompositeSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/set/CompositeSetTest.java b/src/test/java/org/apache/commons/collections4/set/CompositeSetTest.java
index 178a4cf..3420eaf 100644
--- a/src/test/java/org/apache/commons/collections4/set/CompositeSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/set/CompositeSetTest.java
@@ -37,15 +37,15 @@ public class CompositeSetTest<E> extends AbstractSetTest<E> {
 
     @Override
     public CompositeSet<E> makeObject() {
-        final HashSet<E> contained = new HashSet<E>();
-        final CompositeSet<E> set = new CompositeSet<E>(contained);
-        set.setMutator( new EmptySetMutator<E>(contained) );
+        final HashSet<E> contained = new HashSet<>();
+        final CompositeSet<E> set = new CompositeSet<>(contained);
+        set.setMutator( new EmptySetMutator<>(contained) );
         return set;
     }
 
     @SuppressWarnings("unchecked")
     public Set<E> buildOne() {
-        final HashSet<E> set = new HashSet<E>();
+        final HashSet<E> set = new HashSet<>();
         set.add((E) "1");
         set.add((E) "2");
         return set;
@@ -53,7 +53,7 @@ public class CompositeSetTest<E> extends AbstractSetTest<E> {
 
     @SuppressWarnings("unchecked")
     public Set<E> buildTwo() {
-        final HashSet<E> set = new HashSet<E>();
+        final HashSet<E> set = new HashSet<>();
         set.add((E) "3");
         set.add((E) "4");
         return set;
@@ -61,7 +61,7 @@ public class CompositeSetTest<E> extends AbstractSetTest<E> {
 
     @SuppressWarnings("unchecked")
     public void testContains() {
-        final CompositeSet<E> set = new CompositeSet<E>(new Set[]{ buildOne(), buildTwo() });
+        final CompositeSet<E> set = new CompositeSet<>(new Set[]{ buildOne(), buildTwo() });
         assertTrue(set.contains("1"));
     }
 
@@ -69,7 +69,7 @@ public class CompositeSetTest<E> extends AbstractSetTest<E> {
     public void testRemoveUnderlying() {
         final Set<E> one = buildOne();
         final Set<E> two = buildTwo();
-        final CompositeSet<E> set = new CompositeSet<E>(new Set[] { one, two });
+        final CompositeSet<E> set = new CompositeSet<>(new Set[] { one, two });
         one.remove("1");
         assertFalse(set.contains("1"));
 
@@ -81,7 +81,7 @@ public class CompositeSetTest<E> extends AbstractSetTest<E> {
     public void testRemoveComposited() {
         final Set<E> one = buildOne();
         final Set<E> two = buildTwo();
-        final CompositeSet<E> set = new CompositeSet<E>(new Set[] { one, two });
+        final CompositeSet<E> set = new CompositeSet<>(new Set[] { one, two });
         set.remove("1");
         assertFalse(one.contains("1"));
 
@@ -93,7 +93,7 @@ public class CompositeSetTest<E> extends AbstractSetTest<E> {
     public void testFailedCollisionResolution() {
         final Set<E> one = buildOne();
         final Set<E> two = buildTwo();
-        final CompositeSet<E> set = new CompositeSet<E>(new Set[] { one, two });
+        final CompositeSet<E> set = new CompositeSet<>(new Set[] { one, two });
         set.setMutator(new SetMutator<E>() {
             private static final long serialVersionUID = 1L;
 
@@ -116,7 +116,7 @@ public class CompositeSetTest<E> extends AbstractSetTest<E> {
             }
         });
 
-        final HashSet<E> three = new HashSet<E>();
+        final HashSet<E> three = new HashSet<>();
         three.add((E) "1");
         try {
             set.addComposited(three);
@@ -131,18 +131,18 @@ public class CompositeSetTest<E> extends AbstractSetTest<E> {
     public void testAddComposited() {
         final Set<E> one = buildOne();
         final Set<E> two = buildTwo();
-        final CompositeSet<E> set = new CompositeSet<E>();
+        final CompositeSet<E> set = new CompositeSet<>();
         set.addComposited(one, two);
-        final CompositeSet<E> set2 = new CompositeSet<E>(buildOne());
+        final CompositeSet<E> set2 = new CompositeSet<>(buildOne());
         set2.addComposited(buildTwo());
         assertTrue(set.equals(set2));
-        final HashSet<E> set3 = new HashSet<E>();
+        final HashSet<E> set3 = new HashSet<>();
         set3.add((E) "1");
         set3.add((E) "2");
         set3.add((E) "3");
-        final HashSet<E> set4 = new HashSet<E>();
+        final HashSet<E> set4 = new HashSet<>();
         set4.add((E) "4");
-        final CompositeSet<E> set5 = new CompositeSet<E>(set3);
+        final CompositeSet<E> set5 = new CompositeSet<>(set3);
         set5.addComposited(set4);
         assertTrue(set.equals(set5));
         try {
@@ -155,13 +155,13 @@ public class CompositeSetTest<E> extends AbstractSetTest<E> {
 
     @SuppressWarnings("unchecked")
     public void testAddCompositedCollision() {
-        final HashSet<E> set1 = new HashSet<E>();
+        final HashSet<E> set1 = new HashSet<>();
         set1.add((E) "1");
         set1.add((E) "2");
         set1.add((E) "3");
-        final HashSet<E> set2 = new HashSet<E>();
+        final HashSet<E> set2 = new HashSet<>();
         set2.add((E) "4");
-        final CompositeSet<E> set3 = new CompositeSet<E>(set1);
+        final CompositeSet<E> set3 = new CompositeSet<>(set1);
         try {
             set3.addComposited(set1, buildOne());
             fail("Expecting UnsupportedOperationException.");

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/set/ListOrderedSet2Test.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/set/ListOrderedSet2Test.java b/src/test/java/org/apache/commons/collections4/set/ListOrderedSet2Test.java
index 8df7cbc..5321278 100644
--- a/src/test/java/org/apache/commons/collections4/set/ListOrderedSet2Test.java
+++ b/src/test/java/org/apache/commons/collections4/set/ListOrderedSet2Test.java
@@ -40,7 +40,7 @@ public class ListOrderedSet2Test<E> extends AbstractSetTest<E> {
 
     @Override
     public ListOrderedSet<E> makeObject() {
-        return new ListOrderedSet<E>();
+        return new ListOrderedSet<>();
     }
 
     @SuppressWarnings("unchecked")
@@ -134,7 +134,7 @@ public class ListOrderedSet2Test<E> extends AbstractSetTest<E> {
         assertSame(ONE, set.get(1));
         assertSame(TWO, set.get(2));
 
-        final List<E> list = new ArrayList<E>();
+        final List<E> list = new ArrayList<>();
         list.add((E) ZERO);
         list.add((E) TWO);
 

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/set/ListOrderedSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/set/ListOrderedSetTest.java b/src/test/java/org/apache/commons/collections4/set/ListOrderedSetTest.java
index 38b431a..4ed0f3b 100644
--- a/src/test/java/org/apache/commons/collections4/set/ListOrderedSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/set/ListOrderedSetTest.java
@@ -145,7 +145,7 @@ public class ListOrderedSetTest<E>
         assertSame(ONE, set.get(1));
         assertSame(TWO, set.get(2));
 
-        final List<E> list = new ArrayList<E>();
+        final List<E> list = new ArrayList<>();
         list.add((E) ZERO);
         list.add((E) TWO);
 
@@ -182,14 +182,14 @@ public class ListOrderedSetTest<E>
 
     @SuppressWarnings("unchecked")
     public void testRetainAll() {
-        final List<E> list = new ArrayList<E>(10);
-        final Set<E> set = new HashSet<E>(10);
+        final List<E> list = new ArrayList<>(10);
+        final Set<E> set = new HashSet<>(10);
         final ListOrderedSet<E> orderedSet = ListOrderedSet.listOrderedSet(set, list);
         for (int i = 0; i < 10; ++i) {
             orderedSet.add((E) Integer.valueOf(10 - i - 1));
         }
 
-        final Collection<E> retained = new ArrayList<E>(5);
+        final Collection<E> retained = new ArrayList<>(5);
         for (int i = 0; i < 5; ++i) {
             retained.add((E) Integer.valueOf(i * 2));
         }
@@ -206,7 +206,7 @@ public class ListOrderedSetTest<E>
 
     @SuppressWarnings("unchecked")
     public void testDuplicates() {
-        final List<E> list = new ArrayList<E>(10);
+        final List<E> list = new ArrayList<>(10);
         list.add((E) Integer.valueOf(1));
         list.add((E) Integer.valueOf(2));
         list.add((E) Integer.valueOf(3));

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/set/PredicatedNavigableSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/set/PredicatedNavigableSetTest.java b/src/test/java/org/apache/commons/collections4/set/PredicatedNavigableSetTest.java
index 1fef276..6b9aae9 100644
--- a/src/test/java/org/apache/commons/collections4/set/PredicatedNavigableSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/set/PredicatedNavigableSetTest.java
@@ -56,7 +56,7 @@ public class PredicatedNavigableSetTest<E> extends AbstractNavigableSetTest<E> {
 
     @Override
     public NavigableSet<E> makeFullCollection() {
-        final TreeSet<E> set = new TreeSet<E>();
+        final TreeSet<E> set = new TreeSet<>();
         set.addAll(Arrays.asList(getFullElements()));
         return PredicatedNavigableSet.predicatedNavigableSet(set, truePredicate);
     }
@@ -96,7 +96,7 @@ public class PredicatedNavigableSetTest<E> extends AbstractNavigableSetTest<E> {
     @SuppressWarnings("unchecked")
     public void testIllegalAddAll() {
         final NavigableSet<E> set = makeTestSet();
-        final Set<E> elements = new TreeSet<E>();
+        final Set<E> elements = new TreeSet<>();
         elements.add((E) "Aone");
         elements.add((E) "Atwo");
         elements.add((E) "Bthree");

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/set/PredicatedSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/set/PredicatedSetTest.java b/src/test/java/org/apache/commons/collections4/set/PredicatedSetTest.java
index 5e196cf..c107f9b 100644
--- a/src/test/java/org/apache/commons/collections4/set/PredicatedSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/set/PredicatedSetTest.java
@@ -90,7 +90,7 @@ public class PredicatedSetTest<E> extends AbstractSetTest<E> {
     @SuppressWarnings("unchecked")
     public void testIllegalAddAll() {
         final Set<E> set = makeTestSet();
-        final Set<E> elements = new HashSet<E>();
+        final Set<E> elements = new HashSet<>();
         elements.add((E) "one");
         elements.add((E) "two");
         elements.add((E) Integer.valueOf(3));

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/set/PredicatedSortedSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/set/PredicatedSortedSetTest.java b/src/test/java/org/apache/commons/collections4/set/PredicatedSortedSetTest.java
index a605898..27a8b49 100644
--- a/src/test/java/org/apache/commons/collections4/set/PredicatedSortedSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/set/PredicatedSortedSetTest.java
@@ -56,7 +56,7 @@ public class PredicatedSortedSetTest<E> extends AbstractSortedSetTest<E> {
 
     @Override
     public SortedSet<E> makeFullCollection() {
-        final TreeSet<E> set = new TreeSet<E>();
+        final TreeSet<E> set = new TreeSet<>();
         set.addAll(Arrays.asList(getFullElements()));
         return PredicatedSortedSet.predicatedSortedSet(set, truePredicate);
     }
@@ -96,7 +96,7 @@ public class PredicatedSortedSetTest<E> extends AbstractSortedSetTest<E> {
     @SuppressWarnings("unchecked")
     public void testIllegalAddAll() {
         final SortedSet<E> set = makeTestSet();
-        final Set<E> elements = new TreeSet<E>();
+        final Set<E> elements = new TreeSet<>();
         elements.add((E) "Aone");
         elements.add((E) "Atwo");
         elements.add((E) "Bthree");

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/set/TransformedNavigableSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/set/TransformedNavigableSetTest.java b/src/test/java/org/apache/commons/collections4/set/TransformedNavigableSetTest.java
index cec1f6f..7b77c30 100644
--- a/src/test/java/org/apache/commons/collections4/set/TransformedNavigableSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/set/TransformedNavigableSetTest.java
@@ -56,7 +56,7 @@ public class TransformedNavigableSetTest<E> extends AbstractNavigableSetTest<E>
     @Override
     @SuppressWarnings("unchecked")
     public NavigableSet<E> makeFullCollection() {
-        final NavigableSet<E> set = new TreeSet<E>();
+        final NavigableSet<E> set = new TreeSet<>();
         set.addAll(Arrays.asList(getFullElements()));
         return TransformedNavigableSet.transformingNavigableSet(set,
                 (Transformer<E, E>) TransformedCollectionTest.NOOP_TRANSFORMER);
@@ -79,7 +79,7 @@ public class TransformedNavigableSetTest<E> extends AbstractNavigableSetTest<E>
     }
 
     public void testTransformedSet_decorateTransform() {
-        final Set<Object> originalSet = new TreeSet<Object>();
+        final Set<Object> originalSet = new TreeSet<>();
         final Object[] els = new Object[] {"1", "3", "5", "7", "2", "4", "6"};
         Collections.addAll(originalSet, els);
         final Set<?> set = TransformedSet.transformedSet(originalSet,

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/set/TransformedSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/set/TransformedSetTest.java b/src/test/java/org/apache/commons/collections4/set/TransformedSetTest.java
index 2c19b5e..2f8e116 100644
--- a/src/test/java/org/apache/commons/collections4/set/TransformedSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/set/TransformedSetTest.java
@@ -39,12 +39,12 @@ public class TransformedSetTest<E> extends AbstractSetTest<E> {
 
     @Override
     public Set<E> makeConfirmedCollection() {
-        return new HashSet<E>();
+        return new HashSet<>();
     }
 
     @Override
     public Set<E> makeConfirmedFullCollection() {
-        final Set<E> set = new HashSet<E>();
+        final Set<E> set = new HashSet<>();
         set.addAll(Arrays.asList(getFullElements()));
         return set;
     }
@@ -59,7 +59,7 @@ public class TransformedSetTest<E> extends AbstractSetTest<E> {
     @Override
     @SuppressWarnings("unchecked")
     public Set<E> makeFullCollection() {
-        final Set<E> list = new HashSet<E>();
+        final Set<E> list = new HashSet<>();
         list.addAll(Arrays.asList(getFullElements()));
         return TransformedSet.transformingSet(list,
                 (Transformer<E, E>) TransformedCollectionTest.NOOP_TRANSFORMER);
@@ -84,7 +84,7 @@ public class TransformedSetTest<E> extends AbstractSetTest<E> {
     }
 
     public void testTransformedSet_decorateTransform() {
-        final Set<Object> originalSet = new HashSet<Object>();
+        final Set<Object> originalSet = new HashSet<>();
         final Object[] els = new Object[] {"1", "3", "5", "7", "2", "4", "6"};
         Collections.addAll(originalSet, els);
         final Set<?> set = TransformedSet.transformedSet(originalSet, TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER);

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/set/TransformedSortedSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/set/TransformedSortedSetTest.java b/src/test/java/org/apache/commons/collections4/set/TransformedSortedSetTest.java
index 9207986..594cfbe 100644
--- a/src/test/java/org/apache/commons/collections4/set/TransformedSortedSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/set/TransformedSortedSetTest.java
@@ -55,7 +55,7 @@ public class TransformedSortedSetTest<E> extends AbstractSortedSetTest<E> {
     @Override
     @SuppressWarnings("unchecked")
     public SortedSet<E> makeFullCollection() {
-        final SortedSet<E> set = new TreeSet<E>();
+        final SortedSet<E> set = new TreeSet<>();
         set.addAll(Arrays.asList(getFullElements()));
         return TransformedSortedSet.transformingSortedSet(set, (Transformer<E, E>) TransformedCollectionTest.NOOP_TRANSFORMER);
     }
@@ -77,7 +77,7 @@ public class TransformedSortedSetTest<E> extends AbstractSortedSetTest<E> {
     }
 
     public void testTransformedSet_decorateTransform() {
-        final Set<Object> originalSet = new TreeSet<Object>();
+        final Set<Object> originalSet = new TreeSet<>();
         final Object[] els = new Object[] {"1", "3", "5", "7", "2", "4", "6"};
         Collections.addAll(originalSet, els);
         final Set<?> set = TransformedSet.transformedSet(originalSet, TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER);

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/set/UnmodifiableNavigableSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/set/UnmodifiableNavigableSetTest.java b/src/test/java/org/apache/commons/collections4/set/UnmodifiableNavigableSetTest.java
index d2c4a42..e4afcd8 100644
--- a/src/test/java/org/apache/commons/collections4/set/UnmodifiableNavigableSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/set/UnmodifiableNavigableSetTest.java
@@ -54,7 +54,7 @@ public class UnmodifiableNavigableSetTest<E> extends AbstractNavigableSetTest<E>
 
     @Override
     public UnmodifiableNavigableSet<E> makeFullCollection() {
-        final TreeSet<E> set = new TreeSet<E>();
+        final TreeSet<E> set = new TreeSet<>();
         set.addAll(Arrays.asList(getFullElements()));
         return (UnmodifiableNavigableSet<E>) UnmodifiableNavigableSet.unmodifiableNavigableSet(set);
     }
@@ -73,7 +73,7 @@ public class UnmodifiableNavigableSetTest<E> extends AbstractNavigableSetTest<E>
     @SuppressWarnings("unchecked")
     protected void setupSet() {
         set = makeFullCollection();
-        array = new ArrayList<E>();
+        array = new ArrayList<>();
         array.add((E) Integer.valueOf(1));
     }
 

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/set/UnmodifiableSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/set/UnmodifiableSetTest.java b/src/test/java/org/apache/commons/collections4/set/UnmodifiableSetTest.java
index f5ec169..55146ed 100644
--- a/src/test/java/org/apache/commons/collections4/set/UnmodifiableSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/set/UnmodifiableSetTest.java
@@ -50,7 +50,7 @@ public class UnmodifiableSetTest<E> extends AbstractSetTest<E> {
 
     @Override
     public Set<E> makeFullCollection() {
-        final HashSet<E> set = new HashSet<E>();
+        final HashSet<E> set = new HashSet<>();
         set.addAll(Arrays.asList(getFullElements()));
         return UnmodifiableSet.unmodifiableSet(set);
     }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/set/UnmodifiableSortedSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/set/UnmodifiableSortedSetTest.java b/src/test/java/org/apache/commons/collections4/set/UnmodifiableSortedSetTest.java
index 0a24cd6..037d917 100644
--- a/src/test/java/org/apache/commons/collections4/set/UnmodifiableSortedSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/set/UnmodifiableSortedSetTest.java
@@ -54,7 +54,7 @@ public class UnmodifiableSortedSetTest<E> extends AbstractSortedSetTest<E> {
 
     @Override
     public UnmodifiableSortedSet<E> makeFullCollection() {
-        final TreeSet<E> set = new TreeSet<E>();
+        final TreeSet<E> set = new TreeSet<>();
         set.addAll(Arrays.asList(getFullElements()));
         return (UnmodifiableSortedSet<E>) UnmodifiableSortedSet.unmodifiableSortedSet(set);
     }
@@ -73,7 +73,7 @@ public class UnmodifiableSortedSetTest<E> extends AbstractSortedSetTest<E> {
     @SuppressWarnings("unchecked")
     protected void setupSet() {
         set = makeFullCollection();
-        array = new ArrayList<E>();
+        array = new ArrayList<>();
         array.add((E) Integer.valueOf(1));
     }
 

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/splitmap/TransformedSplitMapTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/splitmap/TransformedSplitMapTest.java b/src/test/java/org/apache/commons/collections4/splitmap/TransformedSplitMapTest.java
index 1e08e2a..98b5ecb 100644
--- a/src/test/java/org/apache/commons/collections4/splitmap/TransformedSplitMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/splitmap/TransformedSplitMapTest.java
@@ -67,7 +67,7 @@ public class TransformedSplitMapTest extends BulkTest {
                 new HashMap<String, Class<?>>(), intToString, objectToClass);
 
         final Integer[] k = new Integer[] { 0, 1, 2, 3, 4, 5, 6 };
-        final Object[] v = new Object[] { "", new Object(), new HashMap<Object, Object>(), 0, BigInteger.TEN, null,
+        final Object[] v = new Object[] { "", new Object(), new HashMap<>(), 0, BigInteger.TEN, null,
                 new Object[0] };
 
         assertEquals(0, map.size());

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/trie/PatriciaTrie2Test.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/trie/PatriciaTrie2Test.java b/src/test/java/org/apache/commons/collections4/trie/PatriciaTrie2Test.java
index cd136e5..04e773e 100644
--- a/src/test/java/org/apache/commons/collections4/trie/PatriciaTrie2Test.java
+++ b/src/test/java/org/apache/commons/collections4/trie/PatriciaTrie2Test.java
@@ -40,7 +40,7 @@ public class PatriciaTrie2Test<V> extends AbstractOrderedMapTest<String, V> {
 
     @Override
     public OrderedMap<String, V> makeObject() {
-        return new PatriciaTrie<V>();
+        return new PatriciaTrie<>();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/trie/PatriciaTrieTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/trie/PatriciaTrieTest.java b/src/test/java/org/apache/commons/collections4/trie/PatriciaTrieTest.java
index 92559fb..c143f00 100755
--- a/src/test/java/org/apache/commons/collections4/trie/PatriciaTrieTest.java
+++ b/src/test/java/org/apache/commons/collections4/trie/PatriciaTrieTest.java
@@ -51,7 +51,7 @@ public class PatriciaTrieTest<V> extends AbstractSortedMapTest<String, V> {
 
     @Override
     public SortedMap<String, V> makeObject() {
-        return new PatriciaTrie<V>();
+        return new PatriciaTrie<>();
     }
 
     @Override
@@ -62,7 +62,7 @@ public class PatriciaTrieTest<V> extends AbstractSortedMapTest<String, V> {
     //-----------------------------------------------------------------------
 
     public void testPrefixMap() {
-        final PatriciaTrie<String> trie = new PatriciaTrie<String>();
+        final PatriciaTrie<String> trie = new PatriciaTrie<>();
 
         final String[] keys = new String[]{
                 "",
@@ -289,7 +289,7 @@ public class PatriciaTrieTest<V> extends AbstractSortedMapTest<String, V> {
     }
 
     public void testPrefixMapRemoval() {
-        final PatriciaTrie<String> trie = new PatriciaTrie<String>();
+        final PatriciaTrie<String> trie = new PatriciaTrie<>();
 
         final String[] keys = new String[]{
                 "Albert", "Xavier", "XyZ", "Anna", "Alien", "Alberto",
@@ -332,7 +332,7 @@ public class PatriciaTrieTest<V> extends AbstractSortedMapTest<String, V> {
 
     public void testPrefixMapSizes() {
         // COLLECTIONS-525
-        PatriciaTrie<String> aTree = new PatriciaTrie<String>();
+        PatriciaTrie<String> aTree = new PatriciaTrie<>();
         aTree.put("点评", "测试");
         aTree.put("书评", "测试");
         assertTrue(aTree.prefixMap("点").containsKey("点评"));
@@ -354,7 +354,7 @@ public class PatriciaTrieTest<V> extends AbstractSortedMapTest<String, V> {
         final char u8000 = Character.toChars(32768)[0]; // U+8000 (1000000000000000)
         final char char_b = 'b'; // 1100010
 
-        final PatriciaTrie<String> trie = new PatriciaTrie<String>();
+        final PatriciaTrie<String> trie = new PatriciaTrie<>();
         final String prefixString = "" + char_b;
         final String longerString = prefixString + u8000;
 
@@ -371,7 +371,7 @@ public class PatriciaTrieTest<V> extends AbstractSortedMapTest<String, V> {
     }
 
     public void testPrefixMapClear() {
-        Trie<String, Integer> trie = new PatriciaTrie<Integer>();
+        Trie<String, Integer> trie = new PatriciaTrie<>();
         trie.put("Anna", 1);
         trie.put("Anael", 2);
         trie.put("Analu", 3);
@@ -380,33 +380,33 @@ public class PatriciaTrieTest<V> extends AbstractSortedMapTest<String, V> {
         trie.put("Andres", 6);
         trie.put("Anatole", 7);
         SortedMap<String, Integer> prefixMap = trie.prefixMap("And");
-        assertEquals(new HashSet<String>(Arrays.asList("Andrea", "Andreas", "Andres")), prefixMap.keySet());
-        assertEquals(Arrays.asList(5, 4, 6), new ArrayList<Integer>(prefixMap.values()));
+        assertEquals(new HashSet<>(Arrays.asList("Andrea", "Andreas", "Andres")), prefixMap.keySet());
+        assertEquals(Arrays.asList(5, 4, 6), new ArrayList<>(prefixMap.values()));
 
         prefixMap.clear();
         assertTrue(prefixMap.isEmpty());
         assertTrue(prefixMap.keySet().isEmpty());
         assertTrue(prefixMap.values().isEmpty());
-        assertEquals(new HashSet<String>(Arrays.asList("Anael", "Analu", "Anatole", "Anna")), trie.keySet());
-        assertEquals(Arrays.asList(2, 3, 7, 1), new ArrayList<Integer>(trie.values()));
+        assertEquals(new HashSet<>(Arrays.asList("Anael", "Analu", "Anatole", "Anna")), trie.keySet());
+        assertEquals(Arrays.asList(2, 3, 7, 1), new ArrayList<>(trie.values()));
     }
 
     public void testPrefixMapClearNothing() {
-        Trie<String, Integer> trie = new PatriciaTrie<Integer>();
+        Trie<String, Integer> trie = new PatriciaTrie<>();
         SortedMap<String, Integer> prefixMap = trie.prefixMap("And");
         assertEquals(new HashSet<String>(), prefixMap.keySet());
-        assertEquals(new ArrayList<Integer>(0), new ArrayList<Integer>(prefixMap.values()));
+        assertEquals(new ArrayList<Integer>(0), new ArrayList<>(prefixMap.values()));
 
         prefixMap.clear();
         assertTrue(prefixMap.isEmpty());
         assertTrue(prefixMap.keySet().isEmpty());
         assertTrue(prefixMap.values().isEmpty());
         assertEquals(new HashSet<String>(), trie.keySet());
-        assertEquals(new ArrayList<Integer>(0), new ArrayList<Integer>(trie.values()));
+        assertEquals(new ArrayList<Integer>(0), new ArrayList<>(trie.values()));
     }
 
     public void testPrefixMapClearUsingRemove() {
-        Trie<String, Integer> trie = new PatriciaTrie<Integer>();
+        Trie<String, Integer> trie = new PatriciaTrie<>();
         trie.put("Anna", 1);
         trie.put("Anael", 2);
         trie.put("Analu", 3);
@@ -415,17 +415,17 @@ public class PatriciaTrieTest<V> extends AbstractSortedMapTest<String, V> {
         trie.put("Andres", 6);
         trie.put("Anatole", 7);
         SortedMap<String, Integer> prefixMap = trie.prefixMap("And");
-        assertEquals(new HashSet<String>(Arrays.asList("Andrea", "Andreas", "Andres")), prefixMap.keySet());
-        assertEquals(Arrays.asList(5, 4, 6), new ArrayList<Integer>(prefixMap.values()));
+        assertEquals(new HashSet<>(Arrays.asList("Andrea", "Andreas", "Andres")), prefixMap.keySet());
+        assertEquals(Arrays.asList(5, 4, 6), new ArrayList<>(prefixMap.values()));
 
-        Set<String> keys = new HashSet<String>(prefixMap.keySet());
+        Set<String> keys = new HashSet<>(prefixMap.keySet());
         for (final String key : keys) {
             prefixMap.remove(key);
         }
         assertTrue(prefixMap.keySet().isEmpty());
         assertTrue(prefixMap.values().isEmpty());
-        assertEquals(new HashSet<String>(Arrays.asList("Anael", "Analu", "Anatole", "Anna")), trie.keySet());
-        assertEquals(Arrays.asList(2, 3, 7, 1), new ArrayList<Integer>(trie.values()));
+        assertEquals(new HashSet<>(Arrays.asList("Anael", "Analu", "Anatole", "Anna")), trie.keySet());
+        assertEquals(Arrays.asList(2, 3, 7, 1), new ArrayList<>(trie.values()));
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/test/java/org/apache/commons/collections4/trie/UnmodifiableTrieTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/trie/UnmodifiableTrieTest.java b/src/test/java/org/apache/commons/collections4/trie/UnmodifiableTrieTest.java
index 1fc8c01..df30a6b 100644
--- a/src/test/java/org/apache/commons/collections4/trie/UnmodifiableTrieTest.java
+++ b/src/test/java/org/apache/commons/collections4/trie/UnmodifiableTrieTest.java
@@ -64,7 +64,7 @@ public class UnmodifiableTrieTest<V> extends AbstractSortedMapTest<String, V> {
 
     @Override
     public Trie<String, V> makeFullMap() {
-        final Trie<String, V> m = new PatriciaTrie<V>();
+        final Trie<String, V> m = new PatriciaTrie<>();
         addSampleMappings(m);
         return UnmodifiableTrie.unmodifiableTrie(m);
     }


Mime
View raw message