commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [8/9] commons-collections git commit: Remove redundant type arguments.
Date Thu, 27 Jul 2017 06:43:28 GMT
http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java
index d6d1ea8..23adc3f 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java
@@ -509,7 +509,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
         Node<K, V> node = rootNode[KEY.ordinal()];
         if (node == null) {
             // map is empty
-            final Node<K, V> root = new Node<K, V>(key, value);
+            final Node<K, V> root = new Node<>(key, value);
             rootNode[KEY.ordinal()] = root;
             rootNode[VALUE.ordinal()] = root;
             grow();
@@ -526,7 +526,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
                     if (node.getLeft(KEY) != null) {
                         node = node.getLeft(KEY);
                     } else {
-                        final Node<K, V> newNode = new Node<K, V>(key, value);
+                        final Node<K, V> newNode = new Node<>(key, value);
 
                         insertValue(newNode);
                         node.setLeft(newNode, KEY);
@@ -540,7 +540,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
                     if (node.getRight(KEY) != null) {
                         node = node.getRight(KEY);
                     } else {
-                        final Node<K, V> newNode = new Node<K, V>(key, value);
+                        final Node<K, V> newNode = new Node<>(key, value);
 
                         insertValue(newNode);
                         node.setRight(newNode, KEY);
@@ -1847,7 +1847,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
         }
 
         private Map.Entry<V, K> createEntry(final Node<K, V> node) {
-            return new UnmodifiableMapEntry<V, K>(node.getValue(), node.getKey());
+            return new UnmodifiableMapEntry<>(node.getValue(), node.getKey());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableBidiMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableBidiMap.java
index 0b59dd7..bad6874 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableBidiMap.java
@@ -58,7 +58,7 @@ public final class UnmodifiableBidiMap<K, V>
             final BidiMap<K, V> tmpMap = (BidiMap<K, V>) map;
             return tmpMap;
         }
-        return new UnmodifiableBidiMap<K, V>(map);
+        return new UnmodifiableBidiMap<>(map);
     }
 
     //-----------------------------------------------------------------------
@@ -127,7 +127,7 @@ public final class UnmodifiableBidiMap<K, V>
     @Override
     public synchronized BidiMap<V, K> inverseBidiMap() {
         if (inverse == null) {
-            inverse = new UnmodifiableBidiMap<V, K>(decorated().inverseBidiMap());
+            inverse = new UnmodifiableBidiMap<>(decorated().inverseBidiMap());
             inverse.inverse = this;
         }
         return inverse;

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java
index 73d4fd9..581734b 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java
@@ -59,7 +59,7 @@ public final class UnmodifiableOrderedBidiMap<K, V>
             final OrderedBidiMap<K, V> tmpMap = (OrderedBidiMap<K, V>) map;
             return tmpMap;
         }
-        return new UnmodifiableOrderedBidiMap<K, V>(map);
+        return new UnmodifiableOrderedBidiMap<>(map);
     }
 
     //-----------------------------------------------------------------------
@@ -138,7 +138,7 @@ public final class UnmodifiableOrderedBidiMap<K, V>
      */
     public OrderedBidiMap<V, K> inverseOrderedBidiMap() {
         if (inverse == null) {
-            inverse = new UnmodifiableOrderedBidiMap<V, K>(decorated().inverseBidiMap());
+            inverse = new UnmodifiableOrderedBidiMap<>(decorated().inverseBidiMap());
             inverse.inverse = this;
         }
         return inverse;

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableSortedBidiMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableSortedBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableSortedBidiMap.java
index 398a2cf..7705718 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableSortedBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableSortedBidiMap.java
@@ -60,7 +60,7 @@ public final class UnmodifiableSortedBidiMap<K, V>
             final SortedBidiMap<K, V> tmpMap = (SortedBidiMap<K, V>) map;
             return tmpMap;
         }
-        return new UnmodifiableSortedBidiMap<K, V>(map);
+        return new UnmodifiableSortedBidiMap<>(map);
     }
 
     //-----------------------------------------------------------------------
@@ -131,7 +131,7 @@ public final class UnmodifiableSortedBidiMap<K, V>
     @Override
     public SortedBidiMap<V, K> inverseBidiMap() {
         if (inverse == null) {
-            inverse = new UnmodifiableSortedBidiMap<V, K>(decorated().inverseBidiMap());
+            inverse = new UnmodifiableSortedBidiMap<>(decorated().inverseBidiMap());
             inverse.inverse = this;
         }
         return inverse;

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/collection/CompositeCollection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/collection/CompositeCollection.java b/src/main/java/org/apache/commons/collections4/collection/CompositeCollection.java
index d8516a3..3525b76 100644
--- a/src/main/java/org/apache/commons/collections4/collection/CompositeCollection.java
+++ b/src/main/java/org/apache/commons/collections4/collection/CompositeCollection.java
@@ -48,7 +48,7 @@ public class CompositeCollection<E> implements Collection<E>, Serializable {
     private CollectionMutator<E> mutator;
 
     /** Collections in the composite */
-    private final List<Collection<E>> all = new ArrayList<Collection<E>>();
+    private final List<Collection<E>> all = new ArrayList<>();
 
     /**
      * Create an empty CompositeCollection.
@@ -156,7 +156,7 @@ public class CompositeCollection<E> implements Collection<E>, Serializable {
         if (all.isEmpty()) {
             return EmptyIterator.<E>emptyIterator();
         }
-        final IteratorChain<E> chain = new IteratorChain<E>();
+        final IteratorChain<E> chain = new IteratorChain<>();
         for (final Collection<E> item : all) {
             chain.addIterator(item.iterator());
         }
@@ -401,7 +401,7 @@ public class CompositeCollection<E> implements Collection<E>, Serializable {
      *         The new collection is <i>not</i> backed by this composite.
      */
     public Collection<E> toCollection() {
-        return new ArrayList<E>(this);
+        return new ArrayList<>(this);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/collection/IndexedCollection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/collection/IndexedCollection.java b/src/main/java/org/apache/commons/collections4/collection/IndexedCollection.java
index c70c3f3..a0ed46b 100644
--- a/src/main/java/org/apache/commons/collections4/collection/IndexedCollection.java
+++ b/src/main/java/org/apache/commons/collections4/collection/IndexedCollection.java
@@ -71,7 +71,7 @@ public class IndexedCollection<K, C> extends AbstractCollectionDecorator<C> {
      */
     public static <K, C> IndexedCollection<K, C> uniqueIndexedCollection(final Collection<C> coll,
                                                                          final Transformer<C, K> keyTransformer) {
-        return new IndexedCollection<K, C>(coll, keyTransformer,
+        return new IndexedCollection<>(coll, keyTransformer,
                                            MultiValueMap.<K, C>multiValueMap(new HashMap<K, Collection<C>>()),
                                            true);
     }
@@ -87,7 +87,7 @@ public class IndexedCollection<K, C> extends AbstractCollectionDecorator<C> {
      */
     public static <K, C> IndexedCollection<K, C> nonUniqueIndexedCollection(final Collection<C> coll,
                                                                             final Transformer<C, K> keyTransformer) {
-        return new IndexedCollection<K, C>(coll, keyTransformer,
+        return new IndexedCollection<>(coll, keyTransformer,
                                            MultiValueMap.<K, C>multiValueMap(new HashMap<K, Collection<C>>()),
                                            false);
     }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/collection/PredicatedCollection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/collection/PredicatedCollection.java b/src/main/java/org/apache/commons/collections4/collection/PredicatedCollection.java
index 7c181ff..468d5fc 100644
--- a/src/main/java/org/apache/commons/collections4/collection/PredicatedCollection.java
+++ b/src/main/java/org/apache/commons/collections4/collection/PredicatedCollection.java
@@ -73,7 +73,7 @@ public class PredicatedCollection<E> extends AbstractCollectionDecorator<E> {
      * @since 4.1
      */
     public static <E> Builder<E> builder(final Predicate<? super E> predicate) {
-        return new Builder<E>(predicate);
+        return new Builder<>(predicate);
     }
 
     /**
@@ -84,7 +84,7 @@ public class PredicatedCollection<E> extends AbstractCollectionDecorator<E> {
      * @since 4.1
      */
     public static <E> Builder<E> notNullBuilder() {
-        return new Builder<E>(NotNullPredicate.<E>notNullPredicate());
+        return new Builder<>(NotNullPredicate.<E>notNullPredicate());
     }
 
     /**
@@ -103,7 +103,7 @@ public class PredicatedCollection<E> extends AbstractCollectionDecorator<E> {
      */
     public static <T> PredicatedCollection<T> predicatedCollection(final Collection<T> coll,
                                                                    final Predicate<? super T> predicate) {
-        return new PredicatedCollection<T>(coll, predicate);
+        return new PredicatedCollection<>(coll, predicate);
     }
 
     //-----------------------------------------------------------------------
@@ -209,10 +209,10 @@ public class PredicatedCollection<E> extends AbstractCollectionDecorator<E> {
         private final Predicate<? super E> predicate;
 
         /** The buffer containing valid elements. */
-        private final List<E> accepted = new ArrayList<E>();
+        private final List<E> accepted = new ArrayList<>();
 
         /** The buffer containing rejected elements. */
-        private final List<E> rejected = new ArrayList<E>();
+        private final List<E> rejected = new ArrayList<>();
 
         // -----------------------------------------------------------------------
         /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/collection/SynchronizedCollection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/collection/SynchronizedCollection.java b/src/main/java/org/apache/commons/collections4/collection/SynchronizedCollection.java
index e09ea8b..88138ca 100644
--- a/src/main/java/org/apache/commons/collections4/collection/SynchronizedCollection.java
+++ b/src/main/java/org/apache/commons/collections4/collection/SynchronizedCollection.java
@@ -58,7 +58,7 @@ public class SynchronizedCollection<E> implements Collection<E>, Serializable {
      * @since 4.0
      */
     public static <T> SynchronizedCollection<T> synchronizedCollection(final Collection<T> coll) {
-        return new SynchronizedCollection<T>(coll);
+        return new SynchronizedCollection<>(coll);
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/collection/TransformedCollection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/collection/TransformedCollection.java b/src/main/java/org/apache/commons/collections4/collection/TransformedCollection.java
index 6034258..1bf13b8 100644
--- a/src/main/java/org/apache/commons/collections4/collection/TransformedCollection.java
+++ b/src/main/java/org/apache/commons/collections4/collection/TransformedCollection.java
@@ -60,7 +60,7 @@ public class TransformedCollection<E> extends AbstractCollectionDecorator<E> {
      */
     public static <E> TransformedCollection<E> transformingCollection(final Collection<E> coll,
             final Transformer<? super E, ? extends E> transformer) {
-        return new TransformedCollection<E>(coll, transformer);
+        return new TransformedCollection<>(coll, transformer);
     }
 
     /**
@@ -81,7 +81,7 @@ public class TransformedCollection<E> extends AbstractCollectionDecorator<E> {
     public static <E> TransformedCollection<E> transformedCollection(final Collection<E> collection,
             final Transformer<? super E, ? extends E> transformer) {
 
-        final TransformedCollection<E> decorated = new TransformedCollection<E>(collection, transformer);
+        final TransformedCollection<E> decorated = new TransformedCollection<>(collection, transformer);
         // null collection & transformer are disallowed by the constructor call above
         if (collection.size() > 0) {
             @SuppressWarnings("unchecked") // collection is of type E
@@ -134,7 +134,7 @@ public class TransformedCollection<E> extends AbstractCollectionDecorator<E> {
      * @return a transformed object
      */
     protected Collection<E> transform(final Collection<? extends E> coll) {
-        final List<E> list = new ArrayList<E>(coll.size());
+        final List<E> list = new ArrayList<>(coll.size());
         for (final E item : coll) {
             list.add(transform(item));
         }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollection.java b/src/main/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollection.java
index 323f7b4..2704bfa 100644
--- a/src/main/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollection.java
+++ b/src/main/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollection.java
@@ -61,7 +61,7 @@ public final class UnmodifiableBoundedCollection<E> extends AbstractCollectionDe
             final BoundedCollection<E> tmpColl = (BoundedCollection<E>) coll;
             return tmpColl;
         }
-        return new UnmodifiableBoundedCollection<E>(coll);
+        return new UnmodifiableBoundedCollection<>(coll);
     }
 
     /**
@@ -98,7 +98,7 @@ public final class UnmodifiableBoundedCollection<E> extends AbstractCollectionDe
         if (coll instanceof BoundedCollection == false) {
             throw new IllegalArgumentException("Collection is not a bounded collection.");
         }
-        return new UnmodifiableBoundedCollection<E>((BoundedCollection<E>) coll);
+        return new UnmodifiableBoundedCollection<>((BoundedCollection<E>) coll);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/collection/UnmodifiableCollection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/collection/UnmodifiableCollection.java b/src/main/java/org/apache/commons/collections4/collection/UnmodifiableCollection.java
index 8d248b3..de9eb36 100644
--- a/src/main/java/org/apache/commons/collections4/collection/UnmodifiableCollection.java
+++ b/src/main/java/org/apache/commons/collections4/collection/UnmodifiableCollection.java
@@ -57,7 +57,7 @@ public final class UnmodifiableCollection<E>
             final Collection<T> tmpColl = (Collection<T>) coll;
             return tmpColl;
         }
-        return new UnmodifiableCollection<T>(coll);
+        return new UnmodifiableCollection<>(coll);
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java b/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java
index e9f43b9..33e1231 100644
--- a/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java
+++ b/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java
@@ -88,7 +88,7 @@ public class ComparatorChain<E> implements Comparator<E>, Serializable {
      * @param reverse    false = forward sort; true = reverse sort
      */
     public ComparatorChain(final Comparator<E> comparator, final boolean reverse) {
-        comparatorChain = new ArrayList<Comparator<E>>(1);
+        comparatorChain = new ArrayList<>(1);
         comparatorChain.add(comparator);
         orderingBits = new BitSet(1);
         if (reverse == true) {

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/comparators/FixedOrderComparator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/comparators/FixedOrderComparator.java b/src/main/java/org/apache/commons/collections4/comparators/FixedOrderComparator.java
index f9a4d7d..1b96b34 100644
--- a/src/main/java/org/apache/commons/collections4/comparators/FixedOrderComparator.java
+++ b/src/main/java/org/apache/commons/collections4/comparators/FixedOrderComparator.java
@@ -60,7 +60,7 @@ public class FixedOrderComparator<T> implements Comparator<T>, Serializable {
     }
 
     /** Internal map of object to position */
-    private final Map<T, Integer> map = new HashMap<T, Integer>();
+    private final Map<T, Integer> map = new HashMap<>();
 
     /** Counter used in determining the position in the map */
     private int counter = 0;

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/AllPredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/AllPredicate.java b/src/main/java/org/apache/commons/collections4/functors/AllPredicate.java
index 583e347..aecfbe7 100644
--- a/src/main/java/org/apache/commons/collections4/functors/AllPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/AllPredicate.java
@@ -61,7 +61,7 @@ public final class AllPredicate<T> extends AbstractQuantifierPredicate<T> {
             return coerce(predicates[0]);
         }
 
-        return new AllPredicate<T>(FunctorUtils.copy(predicates));
+        return new AllPredicate<>(FunctorUtils.copy(predicates));
     }
 
     /**
@@ -84,7 +84,7 @@ public final class AllPredicate<T> extends AbstractQuantifierPredicate<T> {
         if (preds.length == 1) {
             return coerce(preds[0]);
         }
-        return new AllPredicate<T>(preds);
+        return new AllPredicate<>(preds);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/AndPredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/AndPredicate.java b/src/main/java/org/apache/commons/collections4/functors/AndPredicate.java
index 96b5ed8..db080c4 100644
--- a/src/main/java/org/apache/commons/collections4/functors/AndPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/AndPredicate.java
@@ -50,7 +50,7 @@ public final class AndPredicate<T> implements PredicateDecorator<T>, Serializabl
         if (predicate1 == null || predicate2 == null) {
             throw new NullPointerException("Predicate must not be null");
         }
-        return new AndPredicate<T>(predicate1, predicate2);
+        return new AndPredicate<>(predicate1, predicate2);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/AnyPredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/AnyPredicate.java b/src/main/java/org/apache/commons/collections4/functors/AnyPredicate.java
index 95a0dd1..60180bf 100644
--- a/src/main/java/org/apache/commons/collections4/functors/AnyPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/AnyPredicate.java
@@ -57,7 +57,7 @@ public final class AnyPredicate<T> extends AbstractQuantifierPredicate<T> {
         if (predicates.length == 1) {
             return (Predicate<T>) predicates[0];
         }
-        return new AnyPredicate<T>(FunctorUtils.copy(predicates));
+        return new AnyPredicate<>(FunctorUtils.copy(predicates));
     }
 
     /**
@@ -81,7 +81,7 @@ public final class AnyPredicate<T> extends AbstractQuantifierPredicate<T> {
         if (preds.length == 1) {
             return (Predicate<T>) preds[0];
         }
-        return new AnyPredicate<T>(preds);
+        return new AnyPredicate<>(preds);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/ChainedClosure.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/ChainedClosure.java b/src/main/java/org/apache/commons/collections4/functors/ChainedClosure.java
index 326383c..ae7930f 100644
--- a/src/main/java/org/apache/commons/collections4/functors/ChainedClosure.java
+++ b/src/main/java/org/apache/commons/collections4/functors/ChainedClosure.java
@@ -49,7 +49,7 @@ public class ChainedClosure<E> implements Closure<E>, Serializable {
         if (closures.length == 0) {
             return NOPClosure.<E>nopClosure();
         }
-        return new ChainedClosure<E>(closures);
+        return new ChainedClosure<>(closures);
     }
 
     /**
@@ -78,7 +78,7 @@ public class ChainedClosure<E> implements Closure<E>, Serializable {
             cmds[i++] = closure;
         }
         FunctorUtils.validate(cmds);
-        return new ChainedClosure<E>(false, cmds);
+        return new ChainedClosure<>(false, cmds);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/ChainedTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/ChainedTransformer.java b/src/main/java/org/apache/commons/collections4/functors/ChainedTransformer.java
index 1c07dfa..d84fb24 100644
--- a/src/main/java/org/apache/commons/collections4/functors/ChainedTransformer.java
+++ b/src/main/java/org/apache/commons/collections4/functors/ChainedTransformer.java
@@ -52,7 +52,7 @@ public class ChainedTransformer<T> implements Transformer<T, T>, Serializable {
         if (transformers.length == 0) {
             return NOPTransformer.<T>nopTransformer();
         }
-        return new ChainedTransformer<T>(transformers);
+        return new ChainedTransformer<>(transformers);
     }
 
     /**
@@ -78,7 +78,7 @@ public class ChainedTransformer<T> implements Transformer<T, T>, Serializable {
         // convert to array like this to guarantee iterator() ordering
         final Transformer<T, T>[] cmds = transformers.toArray(new Transformer[transformers.size()]);
         FunctorUtils.validate(cmds);
-        return new ChainedTransformer<T>(false, cmds);
+        return new ChainedTransformer<>(false, cmds);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/CloneTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/CloneTransformer.java b/src/main/java/org/apache/commons/collections4/functors/CloneTransformer.java
index 4361845..04a4384 100644
--- a/src/main/java/org/apache/commons/collections4/functors/CloneTransformer.java
+++ b/src/main/java/org/apache/commons/collections4/functors/CloneTransformer.java
@@ -35,7 +35,7 @@ public class CloneTransformer<T> implements Transformer<T, T> {
 
     /** Singleton predicate instance */
     @SuppressWarnings("rawtypes") // the singleton instance works for all types
-    public static final Transformer INSTANCE = new CloneTransformer<Object>();
+    public static final Transformer INSTANCE = new CloneTransformer<>();
 
     /**
      * Factory returning the singleton instance.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/ClosureTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/ClosureTransformer.java b/src/main/java/org/apache/commons/collections4/functors/ClosureTransformer.java
index 9e640e9..6d1795d 100644
--- a/src/main/java/org/apache/commons/collections4/functors/ClosureTransformer.java
+++ b/src/main/java/org/apache/commons/collections4/functors/ClosureTransformer.java
@@ -48,7 +48,7 @@ public class ClosureTransformer<T> implements Transformer<T, T>, Serializable {
         if (closure == null) {
             throw new NullPointerException("Closure must not be null");
         }
-        return new ClosureTransformer<T>(closure);
+        return new ClosureTransformer<>(closure);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/ComparatorPredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/ComparatorPredicate.java b/src/main/java/org/apache/commons/collections4/functors/ComparatorPredicate.java
index 4c4a7ec..fd1d829 100644
--- a/src/main/java/org/apache/commons/collections4/functors/ComparatorPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/ComparatorPredicate.java
@@ -126,7 +126,7 @@ public class ComparatorPredicate<T> implements Predicate<T>, Serializable {
         if (criterion == null) {
             throw new NullPointerException("Criterion must not be null.");
         }
-        return new ComparatorPredicate<T>(object, comparator, criterion);
+        return new ComparatorPredicate<>(object, comparator, criterion);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/ConstantFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/ConstantFactory.java b/src/main/java/org/apache/commons/collections4/functors/ConstantFactory.java
index 4a0f91a..367f5ab 100644
--- a/src/main/java/org/apache/commons/collections4/functors/ConstantFactory.java
+++ b/src/main/java/org/apache/commons/collections4/functors/ConstantFactory.java
@@ -37,7 +37,7 @@ public class ConstantFactory<T> implements Factory<T>, Serializable {
 
     /** Returns null each time */
     @SuppressWarnings("rawtypes") // The null factory works for all object types
-    public static final Factory NULL_INSTANCE = new ConstantFactory<Object>(null);
+    public static final Factory NULL_INSTANCE = new ConstantFactory<>(null);
 
     /** The closures to call in turn */
     private final T iConstant;
@@ -54,7 +54,7 @@ public class ConstantFactory<T> implements Factory<T>, Serializable {
         if (constantToReturn == null) {
             return (Factory<T>) NULL_INSTANCE;
         }
-        return new ConstantFactory<T>(constantToReturn);
+        return new ConstantFactory<>(constantToReturn);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/ConstantTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/ConstantTransformer.java b/src/main/java/org/apache/commons/collections4/functors/ConstantTransformer.java
index 03fdc7b..30b99c5 100644
--- a/src/main/java/org/apache/commons/collections4/functors/ConstantTransformer.java
+++ b/src/main/java/org/apache/commons/collections4/functors/ConstantTransformer.java
@@ -37,7 +37,7 @@ public class ConstantTransformer<I, O> implements Transformer<I, O>, Serializabl
 
     /** Returns null each time */
     @SuppressWarnings("rawtypes")
-    public static final Transformer NULL_INSTANCE = new ConstantTransformer<Object, Object>(null);
+    public static final Transformer NULL_INSTANCE = new ConstantTransformer<>(null);
 
     /** The closures to call in turn */
     private final O iConstant;
@@ -66,7 +66,7 @@ public class ConstantTransformer<I, O> implements Transformer<I, O>, Serializabl
         if (constantToReturn == null) {
             return nullTransformer();
         }
-        return new ConstantTransformer<I, O>(constantToReturn);
+        return new ConstantTransformer<>(constantToReturn);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/DefaultEquator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/DefaultEquator.java b/src/main/java/org/apache/commons/collections4/functors/DefaultEquator.java
index d49db44..4de4f67 100644
--- a/src/main/java/org/apache/commons/collections4/functors/DefaultEquator.java
+++ b/src/main/java/org/apache/commons/collections4/functors/DefaultEquator.java
@@ -34,7 +34,7 @@ public class DefaultEquator<T> implements Equator<T>, Serializable {
 
     /** Static instance */
     @SuppressWarnings("rawtypes") // the static instance works for all types
-    public static final DefaultEquator INSTANCE = new DefaultEquator<Object>();
+    public static final DefaultEquator INSTANCE = new DefaultEquator<>();
 
     /**
      * Hashcode used for <code>null</code> objects.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/EqualPredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/EqualPredicate.java b/src/main/java/org/apache/commons/collections4/functors/EqualPredicate.java
index d4a51b0..041adee 100644
--- a/src/main/java/org/apache/commons/collections4/functors/EqualPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/EqualPredicate.java
@@ -50,7 +50,7 @@ public final class EqualPredicate<T> implements Predicate<T>, Serializable {
         if (object == null) {
             return NullPredicate.nullPredicate();
         }
-        return new EqualPredicate<T>(object);
+        return new EqualPredicate<>(object);
     }
 
     /**
@@ -66,7 +66,7 @@ public final class EqualPredicate<T> implements Predicate<T>, Serializable {
         if (object == null) {
             return NullPredicate.nullPredicate();
         }
-        return new EqualPredicate<T>(object, equator);
+        return new EqualPredicate<>(object, equator);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/ExceptionClosure.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/ExceptionClosure.java b/src/main/java/org/apache/commons/collections4/functors/ExceptionClosure.java
index fa1bce8..bca8f6b 100644
--- a/src/main/java/org/apache/commons/collections4/functors/ExceptionClosure.java
+++ b/src/main/java/org/apache/commons/collections4/functors/ExceptionClosure.java
@@ -34,7 +34,7 @@ public final class ExceptionClosure<E> implements Closure<E>, Serializable {
 
     /** Singleton predicate instance */
     @SuppressWarnings("rawtypes") // the static instance works for all types
-    public static final Closure INSTANCE = new ExceptionClosure<Object>();
+    public static final Closure INSTANCE = new ExceptionClosure<>();
 
     /**
      * Factory returning the singleton instance.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/ExceptionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/ExceptionFactory.java b/src/main/java/org/apache/commons/collections4/functors/ExceptionFactory.java
index fe71fa5..3437ec1 100644
--- a/src/main/java/org/apache/commons/collections4/functors/ExceptionFactory.java
+++ b/src/main/java/org/apache/commons/collections4/functors/ExceptionFactory.java
@@ -34,7 +34,7 @@ public final class ExceptionFactory<T> implements Factory<T>, Serializable {
 
     /** Singleton predicate instance */
     @SuppressWarnings("rawtypes") // the static instance works for all types
-    public static final Factory INSTANCE = new ExceptionFactory<Object>();
+    public static final Factory INSTANCE = new ExceptionFactory<>();
 
     /**
      * Factory returning the singleton instance.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/ExceptionPredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/ExceptionPredicate.java b/src/main/java/org/apache/commons/collections4/functors/ExceptionPredicate.java
index c5b668d..dd6c585 100644
--- a/src/main/java/org/apache/commons/collections4/functors/ExceptionPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/ExceptionPredicate.java
@@ -34,7 +34,7 @@ public final class ExceptionPredicate<T> implements Predicate<T>, Serializable {
 
     /** Singleton predicate instance */
     @SuppressWarnings("rawtypes") // the static instance works for all types
-    public static final Predicate INSTANCE = new ExceptionPredicate<Object>();
+    public static final Predicate INSTANCE = new ExceptionPredicate<>();
 
     /**
      * Factory returning the singleton instance.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/ExceptionTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/ExceptionTransformer.java b/src/main/java/org/apache/commons/collections4/functors/ExceptionTransformer.java
index 51269c7..11fb318 100644
--- a/src/main/java/org/apache/commons/collections4/functors/ExceptionTransformer.java
+++ b/src/main/java/org/apache/commons/collections4/functors/ExceptionTransformer.java
@@ -34,7 +34,7 @@ public final class ExceptionTransformer<I, O> implements Transformer<I, O>, Seri
 
     /** Singleton predicate instance */
     @SuppressWarnings("rawtypes") // the static instance works for all types
-    public static final Transformer INSTANCE = new ExceptionTransformer<Object, Object>();
+    public static final Transformer INSTANCE = new ExceptionTransformer<>();
 
     /**
      * Factory returning the singleton instance.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/FactoryTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/FactoryTransformer.java b/src/main/java/org/apache/commons/collections4/functors/FactoryTransformer.java
index cf8a5d1..4f6d432 100644
--- a/src/main/java/org/apache/commons/collections4/functors/FactoryTransformer.java
+++ b/src/main/java/org/apache/commons/collections4/functors/FactoryTransformer.java
@@ -48,7 +48,7 @@ public class FactoryTransformer<I, O> implements Transformer<I, O>, Serializable
         if (factory == null) {
             throw new NullPointerException("Factory must not be null");
         }
-        return new FactoryTransformer<I, O>(factory);
+        return new FactoryTransformer<>(factory);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/FalsePredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/FalsePredicate.java b/src/main/java/org/apache/commons/collections4/functors/FalsePredicate.java
index 388deee..9ba26e6 100644
--- a/src/main/java/org/apache/commons/collections4/functors/FalsePredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/FalsePredicate.java
@@ -33,7 +33,7 @@ public final class FalsePredicate<T> implements Predicate<T>, Serializable {
 
     /** Singleton predicate instance */
     @SuppressWarnings("rawtypes") // the static instance works for all types
-    public static final Predicate INSTANCE = new FalsePredicate<Object>();
+    public static final Predicate INSTANCE = new FalsePredicate<>();
 
     /**
      * Get a typed instance.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/ForClosure.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/ForClosure.java b/src/main/java/org/apache/commons/collections4/functors/ForClosure.java
index e2e9459..20a9e87 100644
--- a/src/main/java/org/apache/commons/collections4/functors/ForClosure.java
+++ b/src/main/java/org/apache/commons/collections4/functors/ForClosure.java
@@ -55,7 +55,7 @@ public class ForClosure<E> implements Closure<E> {
         if (count == 1) {
             return (Closure<E>) closure;
         }
-        return new ForClosure<E>(count, closure);
+        return new ForClosure<>(count, closure);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/IdentityPredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/IdentityPredicate.java b/src/main/java/org/apache/commons/collections4/functors/IdentityPredicate.java
index 369e5c9..d991b2a 100644
--- a/src/main/java/org/apache/commons/collections4/functors/IdentityPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/IdentityPredicate.java
@@ -46,7 +46,7 @@ public final class IdentityPredicate<T> implements Predicate<T>, Serializable {
         if (object == null) {
             return NullPredicate.<T>nullPredicate();
         }
-        return new IdentityPredicate<T>(object);
+        return new IdentityPredicate<>(object);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/IfClosure.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/IfClosure.java b/src/main/java/org/apache/commons/collections4/functors/IfClosure.java
index 895a766..99027cd 100644
--- a/src/main/java/org/apache/commons/collections4/functors/IfClosure.java
+++ b/src/main/java/org/apache/commons/collections4/functors/IfClosure.java
@@ -76,7 +76,7 @@ public class IfClosure<E> implements Closure<E>, Serializable {
         if (trueClosure == null || falseClosure == null) {
             throw new NullPointerException("Closures must not be null");
         }
-        return new IfClosure<E>(predicate, trueClosure, falseClosure);
+        return new IfClosure<>(predicate, trueClosure, falseClosure);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/IfTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/IfTransformer.java b/src/main/java/org/apache/commons/collections4/functors/IfTransformer.java
index 933e53e..f4e60f7 100644
--- a/src/main/java/org/apache/commons/collections4/functors/IfTransformer.java
+++ b/src/main/java/org/apache/commons/collections4/functors/IfTransformer.java
@@ -64,7 +64,7 @@ public class IfTransformer<I, O> implements Transformer<I, O>, Serializable {
             throw new NullPointerException("Transformers must not be null");
         }
 
-        return new IfTransformer<I, O>(predicate, trueTransformer, falseTransformer);
+        return new IfTransformer<>(predicate, trueTransformer, falseTransformer);
     }
 
     /**
@@ -90,7 +90,7 @@ public class IfTransformer<I, O> implements Transformer<I, O>, Serializable {
             throw new NullPointerException("Transformer must not be null");
         }
 
-        return new IfTransformer<T, T>(predicate, trueTransformer, NOPTransformer.<T>nopTransformer());
+        return new IfTransformer<>(predicate, trueTransformer, NOPTransformer.<T>nopTransformer());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/InstantiateFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/InstantiateFactory.java b/src/main/java/org/apache/commons/collections4/functors/InstantiateFactory.java
index 457643c..1329afa 100644
--- a/src/main/java/org/apache/commons/collections4/functors/InstantiateFactory.java
+++ b/src/main/java/org/apache/commons/collections4/functors/InstantiateFactory.java
@@ -68,9 +68,9 @@ public class InstantiateFactory<T> implements Factory<T> {
         }
 
         if (paramTypes == null || paramTypes.length == 0) {
-            return new InstantiateFactory<T>(classToInstantiate);
+            return new InstantiateFactory<>(classToInstantiate);
         }
-        return new InstantiateFactory<T>(classToInstantiate, paramTypes, args);
+        return new InstantiateFactory<>(classToInstantiate, paramTypes, args);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/InstantiateTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/InstantiateTransformer.java b/src/main/java/org/apache/commons/collections4/functors/InstantiateTransformer.java
index 757f2a9..58fcf9d 100644
--- a/src/main/java/org/apache/commons/collections4/functors/InstantiateTransformer.java
+++ b/src/main/java/org/apache/commons/collections4/functors/InstantiateTransformer.java
@@ -37,7 +37,7 @@ public class InstantiateTransformer<T> implements Transformer<Class<? extends T>
 
     /** Singleton instance that uses the no arg constructor */
     @SuppressWarnings("rawtypes")
-    private static final Transformer NO_ARG_INSTANCE = new InstantiateTransformer<Object>();
+    private static final Transformer NO_ARG_INSTANCE = new InstantiateTransformer<>();
 
     /** The constructor parameter types */
     private final Class<?>[] iParamTypes;
@@ -73,9 +73,9 @@ public class InstantiateTransformer<T> implements Transformer<Class<? extends T>
         }
 
         if (paramTypes == null || paramTypes.length == 0) {
-            return new InstantiateTransformer<T>();
+            return new InstantiateTransformer<>();
         }
-        return new InstantiateTransformer<T>(paramTypes, args);
+        return new InstantiateTransformer<>(paramTypes, args);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/InvokerTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/InvokerTransformer.java b/src/main/java/org/apache/commons/collections4/functors/InvokerTransformer.java
index 45d90b2..b585098 100644
--- a/src/main/java/org/apache/commons/collections4/functors/InvokerTransformer.java
+++ b/src/main/java/org/apache/commons/collections4/functors/InvokerTransformer.java
@@ -56,7 +56,7 @@ public class InvokerTransformer<I, O> implements Transformer<I, O> {
         if (methodName == null) {
             throw new NullPointerException("The method to invoke must not be null");
         }
-        return new InvokerTransformer<I, O>(methodName);
+        return new InvokerTransformer<>(methodName);
     }
 
     /**
@@ -82,9 +82,9 @@ public class InvokerTransformer<I, O> implements Transformer<I, O> {
             throw new IllegalArgumentException("The parameter types must match the arguments");
         }
         if (paramTypes == null || paramTypes.length == 0) {
-            return new InvokerTransformer<I, O>(methodName);
+            return new InvokerTransformer<>(methodName);
         }
-        return new InvokerTransformer<I, O>(methodName, paramTypes, args);
+        return new InvokerTransformer<>(methodName, paramTypes, args);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/MapTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/MapTransformer.java b/src/main/java/org/apache/commons/collections4/functors/MapTransformer.java
index cfcbc10..9e93ec0 100644
--- a/src/main/java/org/apache/commons/collections4/functors/MapTransformer.java
+++ b/src/main/java/org/apache/commons/collections4/functors/MapTransformer.java
@@ -50,7 +50,7 @@ public final class MapTransformer<I, O> implements Transformer<I, O>, Serializab
         if (map == null) {
             return ConstantTransformer.<I, O>nullTransformer();
         }
-        return new MapTransformer<I, O>(map);
+        return new MapTransformer<>(map);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/NOPClosure.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/NOPClosure.java b/src/main/java/org/apache/commons/collections4/functors/NOPClosure.java
index 9e68898..e8df5ab 100644
--- a/src/main/java/org/apache/commons/collections4/functors/NOPClosure.java
+++ b/src/main/java/org/apache/commons/collections4/functors/NOPClosure.java
@@ -33,7 +33,7 @@ public final class NOPClosure<E> implements Closure<E>, Serializable {
 
     /** Singleton predicate instance */
     @SuppressWarnings("rawtypes")
-    public static final Closure INSTANCE = new NOPClosure<Object>();
+    public static final Closure INSTANCE = new NOPClosure<>();
 
     /**
      * Factory returning the singleton instance.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/NOPTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/NOPTransformer.java b/src/main/java/org/apache/commons/collections4/functors/NOPTransformer.java
index 13e3fbe..9d223e1 100644
--- a/src/main/java/org/apache/commons/collections4/functors/NOPTransformer.java
+++ b/src/main/java/org/apache/commons/collections4/functors/NOPTransformer.java
@@ -33,7 +33,7 @@ public class NOPTransformer<T> implements Transformer<T, T>, Serializable {
 
     /** Singleton predicate instance */
     @SuppressWarnings("rawtypes")
-    public static final Transformer INSTANCE = new NOPTransformer<Object>();
+    public static final Transformer INSTANCE = new NOPTransformer<>();
 
     /**
      * Factory returning the singleton instance.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/NonePredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/NonePredicate.java b/src/main/java/org/apache/commons/collections4/functors/NonePredicate.java
index 7539a57..cdbdfa2 100644
--- a/src/main/java/org/apache/commons/collections4/functors/NonePredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/NonePredicate.java
@@ -52,7 +52,7 @@ public final class NonePredicate<T> extends AbstractQuantifierPredicate<T> {
         if (predicates.length == 0) {
             return TruePredicate.<T>truePredicate();
         }
-        return new NonePredicate<T>(FunctorUtils.copy(predicates));
+        return new NonePredicate<>(FunctorUtils.copy(predicates));
     }
 
     /**
@@ -71,7 +71,7 @@ public final class NonePredicate<T> extends AbstractQuantifierPredicate<T> {
         if (preds.length == 0) {
             return TruePredicate.<T>truePredicate();
         }
-        return new NonePredicate<T>(preds);
+        return new NonePredicate<>(preds);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/NotNullPredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/NotNullPredicate.java b/src/main/java/org/apache/commons/collections4/functors/NotNullPredicate.java
index f06b275..5b6c78b 100644
--- a/src/main/java/org/apache/commons/collections4/functors/NotNullPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/NotNullPredicate.java
@@ -33,7 +33,7 @@ public final class NotNullPredicate<T> implements Predicate<T>, Serializable {
 
     /** Singleton predicate instance */
     @SuppressWarnings("rawtypes")
-    public static final Predicate INSTANCE = new NotNullPredicate<Object>();
+    public static final Predicate INSTANCE = new NotNullPredicate<>();
 
     /**
      * Factory returning the singleton instance.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/NotPredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/NotPredicate.java b/src/main/java/org/apache/commons/collections4/functors/NotPredicate.java
index bd3f257..994512d 100644
--- a/src/main/java/org/apache/commons/collections4/functors/NotPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/NotPredicate.java
@@ -46,7 +46,7 @@ public final class NotPredicate<T> implements PredicateDecorator<T>, Serializabl
         if (predicate == null) {
             throw new NullPointerException("Predicate must not be null");
         }
-        return new NotPredicate<T>(predicate);
+        return new NotPredicate<>(predicate);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/NullIsExceptionPredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/NullIsExceptionPredicate.java b/src/main/java/org/apache/commons/collections4/functors/NullIsExceptionPredicate.java
index 8fdba9b..18bbf05 100644
--- a/src/main/java/org/apache/commons/collections4/functors/NullIsExceptionPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/NullIsExceptionPredicate.java
@@ -47,7 +47,7 @@ public final class NullIsExceptionPredicate<T> implements PredicateDecorator<T>,
         if (predicate == null) {
             throw new NullPointerException("Predicate must not be null");
         }
-        return new NullIsExceptionPredicate<T>(predicate);
+        return new NullIsExceptionPredicate<>(predicate);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/NullIsFalsePredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/NullIsFalsePredicate.java b/src/main/java/org/apache/commons/collections4/functors/NullIsFalsePredicate.java
index 20195c1..a2ca7b2 100644
--- a/src/main/java/org/apache/commons/collections4/functors/NullIsFalsePredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/NullIsFalsePredicate.java
@@ -46,7 +46,7 @@ public final class NullIsFalsePredicate<T> implements PredicateDecorator<T>, Ser
         if (predicate == null) {
             throw new NullPointerException("Predicate must not be null");
         }
-        return new NullIsFalsePredicate<T>(predicate);
+        return new NullIsFalsePredicate<>(predicate);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/NullIsTruePredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/NullIsTruePredicate.java b/src/main/java/org/apache/commons/collections4/functors/NullIsTruePredicate.java
index 34ce9c2..626c3b6 100644
--- a/src/main/java/org/apache/commons/collections4/functors/NullIsTruePredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/NullIsTruePredicate.java
@@ -46,7 +46,7 @@ public final class NullIsTruePredicate<T> implements PredicateDecorator<T>, Seri
         if (predicate == null) {
             throw new NullPointerException("Predicate must not be null");
         }
-        return new NullIsTruePredicate<T>(predicate);
+        return new NullIsTruePredicate<>(predicate);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/NullPredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/NullPredicate.java b/src/main/java/org/apache/commons/collections4/functors/NullPredicate.java
index 354b04c..993e8ef 100644
--- a/src/main/java/org/apache/commons/collections4/functors/NullPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/NullPredicate.java
@@ -33,7 +33,7 @@ public final class NullPredicate<T> implements Predicate<T>, Serializable {
 
     /** Singleton predicate instance */
     @SuppressWarnings("rawtypes")
-    public static final Predicate INSTANCE = new NullPredicate<Object>();
+    public static final Predicate INSTANCE = new NullPredicate<>();
 
     /**
      * Factory returning the singleton instance.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/OnePredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/OnePredicate.java b/src/main/java/org/apache/commons/collections4/functors/OnePredicate.java
index cb829f0..975cb5b 100644
--- a/src/main/java/org/apache/commons/collections4/functors/OnePredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/OnePredicate.java
@@ -57,7 +57,7 @@ public final class OnePredicate<T> extends AbstractQuantifierPredicate<T> {
         if (predicates.length == 1) {
             return (Predicate<T>) predicates[0];
         }
-        return new OnePredicate<T>(FunctorUtils.copy(predicates));
+        return new OnePredicate<>(FunctorUtils.copy(predicates));
     }
 
     /**
@@ -71,7 +71,7 @@ public final class OnePredicate<T> extends AbstractQuantifierPredicate<T> {
      */
     public static <T> Predicate<T> onePredicate(final Collection<? extends Predicate<? super T>> predicates) {
         final Predicate<? super T>[] preds = FunctorUtils.validate(predicates);
-        return new OnePredicate<T>(preds);
+        return new OnePredicate<>(preds);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/OrPredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/OrPredicate.java b/src/main/java/org/apache/commons/collections4/functors/OrPredicate.java
index 6078191..18c0a0f 100644
--- a/src/main/java/org/apache/commons/collections4/functors/OrPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/OrPredicate.java
@@ -50,7 +50,7 @@ public final class OrPredicate<T> implements PredicateDecorator<T>, Serializable
         if (predicate1 == null || predicate2 == null) {
             throw new NullPointerException("Predicate must not be null");
         }
-        return new OrPredicate<T>(predicate1, predicate2);
+        return new OrPredicate<>(predicate1, predicate2);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/PredicateTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/PredicateTransformer.java b/src/main/java/org/apache/commons/collections4/functors/PredicateTransformer.java
index 5abda00..c20970c 100644
--- a/src/main/java/org/apache/commons/collections4/functors/PredicateTransformer.java
+++ b/src/main/java/org/apache/commons/collections4/functors/PredicateTransformer.java
@@ -48,7 +48,7 @@ public class PredicateTransformer<T> implements Transformer<T, Boolean>, Seriali
         if (predicate == null) {
             throw new IllegalArgumentException("Predicate must not be null");
         }
-        return new PredicateTransformer<T>(predicate);
+        return new PredicateTransformer<>(predicate);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/PrototypeFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/PrototypeFactory.java b/src/main/java/org/apache/commons/collections4/functors/PrototypeFactory.java
index 13186cd..bde2878 100644
--- a/src/main/java/org/apache/commons/collections4/functors/PrototypeFactory.java
+++ b/src/main/java/org/apache/commons/collections4/functors/PrototypeFactory.java
@@ -67,18 +67,18 @@ public class PrototypeFactory {
         }
         try {
             final Method method = prototype.getClass().getMethod("clone", (Class[]) null);
-            return new PrototypeCloneFactory<T>(prototype, method);
+            return new PrototypeCloneFactory<>(prototype, method);
 
         } catch (final NoSuchMethodException ex) {
             try {
                 prototype.getClass().getConstructor(new Class<?>[] { prototype.getClass() });
-                return new InstantiateFactory<T>(
+                return new InstantiateFactory<>(
                     (Class<T>) prototype.getClass(),
                     new Class<?>[] { prototype.getClass() },
                     new Object[] { prototype });
             } catch (final NoSuchMethodException ex2) {
                 if (prototype instanceof Serializable) {
-                    return (Factory<T>) new PrototypeSerializationFactory<Serializable>((Serializable) prototype);
+                    return (Factory<T>) new PrototypeSerializationFactory<>((Serializable) prototype);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/StringValueTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/StringValueTransformer.java b/src/main/java/org/apache/commons/collections4/functors/StringValueTransformer.java
index 3749db1..18acda4 100644
--- a/src/main/java/org/apache/commons/collections4/functors/StringValueTransformer.java
+++ b/src/main/java/org/apache/commons/collections4/functors/StringValueTransformer.java
@@ -33,7 +33,7 @@ public final class StringValueTransformer<T> implements Transformer<T, String>,
     private static final long serialVersionUID = 7511110693171758606L;
 
     /** Singleton predicate instance */
-    private static final Transformer<Object, String> INSTANCE = new StringValueTransformer<Object>();
+    private static final Transformer<Object, String> INSTANCE = new StringValueTransformer<>();
 
     /**
      * Factory returning the singleton instance.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/SwitchClosure.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/SwitchClosure.java b/src/main/java/org/apache/commons/collections4/functors/SwitchClosure.java
index 39fe371..48f4a4e 100644
--- a/src/main/java/org/apache/commons/collections4/functors/SwitchClosure.java
+++ b/src/main/java/org/apache/commons/collections4/functors/SwitchClosure.java
@@ -65,7 +65,7 @@ public class SwitchClosure<E> implements Closure<E>, Serializable {
         if (predicates.length == 0) {
             return (Closure<E>) (defaultClosure == null ? NOPClosure.<E>nopClosure(): defaultClosure);
         }
-        return new SwitchClosure<E>(predicates, closures, defaultClosure);
+        return new SwitchClosure<>(predicates, closures, defaultClosure);
     }
 
     /**
@@ -105,7 +105,7 @@ public class SwitchClosure<E> implements Closure<E>, Serializable {
             closures[i] = entry.getValue();
             i++;
         }
-        return new SwitchClosure<E>(false, preds, closures, defaultClosure);
+        return new SwitchClosure<>(false, preds, closures, defaultClosure);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/SwitchTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/SwitchTransformer.java b/src/main/java/org/apache/commons/collections4/functors/SwitchTransformer.java
index 6d8c97a..93a2587 100644
--- a/src/main/java/org/apache/commons/collections4/functors/SwitchTransformer.java
+++ b/src/main/java/org/apache/commons/collections4/functors/SwitchTransformer.java
@@ -66,7 +66,7 @@ public class SwitchTransformer<I, O> implements Transformer<I, O>, Serializable
             return (Transformer<I, O>) (defaultTransformer == null ? ConstantTransformer.<I, O>nullTransformer() :
                                                                      defaultTransformer);
         }
-        return new SwitchTransformer<I, O>(predicates, transformers, defaultTransformer);
+        return new SwitchTransformer<>(predicates, transformers, defaultTransformer);
     }
 
     /**
@@ -114,7 +114,7 @@ public class SwitchTransformer<I, O> implements Transformer<I, O>, Serializable
             transformers[i] = entry.getValue();
             i++;
         }
-        return new SwitchTransformer<I, O>(false, preds, transformers, defaultTransformer);
+        return new SwitchTransformer<>(false, preds, transformers, defaultTransformer);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/TransformedPredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/TransformedPredicate.java b/src/main/java/org/apache/commons/collections4/functors/TransformedPredicate.java
index c91e8df..155c069 100644
--- a/src/main/java/org/apache/commons/collections4/functors/TransformedPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/TransformedPredicate.java
@@ -56,7 +56,7 @@ public final class TransformedPredicate<T> implements PredicateDecorator<T>, Ser
         if (predicate == null) {
             throw new NullPointerException("The predicate to call must not be null");
         }
-        return new TransformedPredicate<T>(transformer, predicate);
+        return new TransformedPredicate<>(transformer, predicate);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/TransformerClosure.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/TransformerClosure.java b/src/main/java/org/apache/commons/collections4/functors/TransformerClosure.java
index f75e9c6..d072d17 100644
--- a/src/main/java/org/apache/commons/collections4/functors/TransformerClosure.java
+++ b/src/main/java/org/apache/commons/collections4/functors/TransformerClosure.java
@@ -49,7 +49,7 @@ public class TransformerClosure<E> implements Closure<E>, Serializable {
         if (transformer == null) {
             return NOPClosure.<E>nopClosure();
         }
-        return new TransformerClosure<E>(transformer);
+        return new TransformerClosure<>(transformer);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/TransformerPredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/TransformerPredicate.java b/src/main/java/org/apache/commons/collections4/functors/TransformerPredicate.java
index f5ed6ba..becefb4 100644
--- a/src/main/java/org/apache/commons/collections4/functors/TransformerPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/TransformerPredicate.java
@@ -48,7 +48,7 @@ public final class TransformerPredicate<T> implements Predicate<T>, Serializable
         if (transformer == null) {
             throw new NullPointerException("The transformer to call must not be null");
         }
-        return new TransformerPredicate<T>(transformer);
+        return new TransformerPredicate<>(transformer);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/TruePredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/TruePredicate.java b/src/main/java/org/apache/commons/collections4/functors/TruePredicate.java
index fb56a91..58b6a0e 100644
--- a/src/main/java/org/apache/commons/collections4/functors/TruePredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/TruePredicate.java
@@ -33,7 +33,7 @@ public final class TruePredicate<T> implements Predicate<T>, Serializable {
 
     /** Singleton predicate instance */
     @SuppressWarnings("rawtypes")
-    public static final Predicate INSTANCE = new TruePredicate<Object>();
+    public static final Predicate INSTANCE = new TruePredicate<>();
 
     /**
      * Factory returning the singleton instance.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/UniquePredicate.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/UniquePredicate.java b/src/main/java/org/apache/commons/collections4/functors/UniquePredicate.java
index 50528ad..18009ad 100644
--- a/src/main/java/org/apache/commons/collections4/functors/UniquePredicate.java
+++ b/src/main/java/org/apache/commons/collections4/functors/UniquePredicate.java
@@ -35,7 +35,7 @@ public final class UniquePredicate<T> implements Predicate<T>, Serializable {
     private static final long serialVersionUID = -3319417438027438040L;
 
     /** The set of previously seen objects */
-    private final Set<T> iSet = new HashSet<T>();
+    private final Set<T> iSet = new HashSet<>();
 
     /**
      * Factory to create the predicate.
@@ -45,7 +45,7 @@ public final class UniquePredicate<T> implements Predicate<T>, Serializable {
      * @throws IllegalArgumentException if the predicate is null
      */
     public static <T> Predicate<T> uniquePredicate() {
-        return new UniquePredicate<T>();
+        return new UniquePredicate<>();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/functors/WhileClosure.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/functors/WhileClosure.java b/src/main/java/org/apache/commons/collections4/functors/WhileClosure.java
index 8f18349..c3c0ecb 100644
--- a/src/main/java/org/apache/commons/collections4/functors/WhileClosure.java
+++ b/src/main/java/org/apache/commons/collections4/functors/WhileClosure.java
@@ -58,7 +58,7 @@ public class WhileClosure<E> implements Closure<E> {
         if (closure == null) {
             throw new NullPointerException("Closure must not be null");
         }
-        return new WhileClosure<E>(predicate, closure, doLoop);
+        return new WhileClosure<>(predicate, closure, doLoop);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/CollatingIterator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/CollatingIterator.java b/src/main/java/org/apache/commons/collections4/iterators/CollatingIterator.java
index 3e5aebb..4ff1c94 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/CollatingIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/CollatingIterator.java
@@ -95,7 +95,7 @@ public class CollatingIterator<E> implements Iterator<E> {
      *   child iterators
      */
     public CollatingIterator(final Comparator<? super E> comp, final int initIterCapacity) {
-        iterators = new ArrayList<Iterator<? extends E>>(initIterCapacity);
+        iterators = new ArrayList<>(initIterCapacity);
         setComparator(comp);
     }
 
@@ -289,7 +289,7 @@ public class CollatingIterator<E> implements Iterator<E> {
      */
     private void start() {
         if (values == null) {
-            values = new ArrayList<E>(iterators.size());
+            values = new ArrayList<>(iterators.size());
             valueSet = new BitSet(iterators.size());
             for (int i = 0; i < iterators.size(); i++) {
                 values.add(null);

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/EmptyIterator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/EmptyIterator.java b/src/main/java/org/apache/commons/collections4/iterators/EmptyIterator.java
index f2cea2d..6f5b0c9 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/EmptyIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/EmptyIterator.java
@@ -37,7 +37,7 @@ public class EmptyIterator<E> extends AbstractEmptyIterator<E> implements Resett
      * @since 3.1
      */
     @SuppressWarnings("rawtypes")
-    public static final ResettableIterator RESETTABLE_INSTANCE = new EmptyIterator<Object>();
+    public static final ResettableIterator RESETTABLE_INSTANCE = new EmptyIterator<>();
 
     /**
      * Singleton instance of the iterator.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/EmptyListIterator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/EmptyListIterator.java b/src/main/java/org/apache/commons/collections4/iterators/EmptyListIterator.java
index 23c1e6d..6c6f8b4 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/EmptyListIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/EmptyListIterator.java
@@ -38,7 +38,7 @@ public class EmptyListIterator<E> extends AbstractEmptyIterator<E> implements
      * @since 3.1
      */
     @SuppressWarnings("rawtypes")
-    public static final ResettableListIterator RESETTABLE_INSTANCE = new EmptyListIterator<Object>();
+    public static final ResettableListIterator RESETTABLE_INSTANCE = new EmptyListIterator<>();
 
     /**
      * Singleton instance of the iterator.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/EmptyMapIterator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/EmptyMapIterator.java b/src/main/java/org/apache/commons/collections4/iterators/EmptyMapIterator.java
index 9d71ded..90fee4a 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/EmptyMapIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/EmptyMapIterator.java
@@ -33,7 +33,7 @@ public class EmptyMapIterator<K, V> extends AbstractEmptyMapIterator<K, V> imple
      * @since 3.1
      */
     @SuppressWarnings("rawtypes")
-    public static final MapIterator INSTANCE = new EmptyMapIterator<Object, Object>();
+    public static final MapIterator INSTANCE = new EmptyMapIterator<>();
 
     /**
      * Get a typed instance of the iterator.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedIterator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedIterator.java b/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedIterator.java
index fd47274..200cae9 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedIterator.java
@@ -33,7 +33,7 @@ public class EmptyOrderedIterator<E> extends AbstractEmptyIterator<E>
      * @since 3.1
      */
     @SuppressWarnings("rawtypes")
-    public static final OrderedIterator INSTANCE = new EmptyOrderedIterator<Object>();
+    public static final OrderedIterator INSTANCE = new EmptyOrderedIterator<>();
 
     /**
      * Typed instance of the iterator.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedMapIterator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedMapIterator.java b/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedMapIterator.java
index e24d8b3..6a5023b 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedMapIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/EmptyOrderedMapIterator.java
@@ -33,7 +33,7 @@ public class EmptyOrderedMapIterator<K, V> extends AbstractEmptyMapIterator<K, V
      * @since 3.1
      */
     @SuppressWarnings("rawtypes")
-    public static final OrderedMapIterator INSTANCE = new EmptyOrderedMapIterator<Object, Object>();
+    public static final OrderedMapIterator INSTANCE = new EmptyOrderedMapIterator<>();
 
     /**
      * Get a typed instance of the iterator.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/IteratorChain.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/IteratorChain.java b/src/main/java/org/apache/commons/collections4/iterators/IteratorChain.java
index 2f86245..5db1c07 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/IteratorChain.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/IteratorChain.java
@@ -51,7 +51,7 @@ import java.util.Queue;
 public class IteratorChain<E> implements Iterator<E> {
 
     /** The chain of iterators */
-    private final Queue<Iterator<? extends E>> iteratorChain = new LinkedList<Iterator<? extends E>>();
+    private final Queue<Iterator<? extends E>> iteratorChain = new LinkedList<>();
 
     /** The current iterator */
     private Iterator<? extends E> currentIterator = null;

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/IteratorIterable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/IteratorIterable.java b/src/main/java/org/apache/commons/collections4/iterators/IteratorIterable.java
index be1261b..b26e089 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/IteratorIterable.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/IteratorIterable.java
@@ -111,7 +111,7 @@ public class IteratorIterable<E> implements Iterable<E> {
     public IteratorIterable(final Iterator<? extends E> iterator, final boolean multipleUse) {
         super();
         if (multipleUse && !(iterator instanceof ResettableIterator)) {
-            this.iterator = new ListIteratorWrapper<E>(iterator);
+            this.iterator = new ListIteratorWrapper<>(iterator);
         } else {
             this.iterator = iterator;
         }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/ListIteratorWrapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/ListIteratorWrapper.java b/src/main/java/org/apache/commons/collections4/iterators/ListIteratorWrapper.java
index 54afd31..3468011 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/ListIteratorWrapper.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/ListIteratorWrapper.java
@@ -57,7 +57,7 @@ public class ListIteratorWrapper<E> implements ResettableListIterator<E> {
     /** The underlying iterator being decorated. */
     private final Iterator<? extends E> iterator;
     /** The list being used to cache the iterator. */
-    private final List<E> list = new ArrayList<E>();
+    private final List<E> list = new ArrayList<>();
 
     /** The current index of this iterator. */
     private int currentIndex = 0;

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java b/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java
index 1b98f1c..b3afc0b 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java
@@ -77,7 +77,7 @@ import org.apache.commons.collections4.Transformer;
 public class ObjectGraphIterator<E> implements Iterator<E> {
 
     /** The stack of iterators */
-    private final Deque<Iterator<? extends E>> stack = new ArrayDeque<Iterator<? extends E>>(8);
+    private final Deque<Iterator<? extends E>> stack = new ArrayDeque<>(8);
     /** The root object in the tree */
     private E root;
     /** The transformer to use */

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/PeekingIterator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/PeekingIterator.java b/src/main/java/org/apache/commons/collections4/iterators/PeekingIterator.java
index 56d2dd9..e6a2d89 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/PeekingIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/PeekingIterator.java
@@ -64,7 +64,7 @@ public class PeekingIterator<E> implements Iterator<E> {
             final PeekingIterator<E> it = (PeekingIterator<E>) iterator;
             return it;
         }
-        return new PeekingIterator<E>(iterator);
+        return new PeekingIterator<>(iterator);
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java b/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java
index 456a3fd..cbb5c33 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java
@@ -82,13 +82,13 @@ public class PermutationIterator<E> implements Iterator<List<E>> {
         direction = new boolean[coll.size()];
         Arrays.fill(direction, false);
         int value = 1;
-        objectMap = new HashMap<Integer, E>();
+        objectMap = new HashMap<>();
         for (E e : coll) {
             objectMap.put(Integer.valueOf(value), e);
             keys[value - 1] = value;
             value++;
         }
-        nextPermutation = new ArrayList<E>(coll);
+        nextPermutation = new ArrayList<>(coll);
     }
 
     /**
@@ -139,7 +139,7 @@ public class PermutationIterator<E> implements Iterator<List<E>> {
         direction[indexOfLargestMobileInteger + offset] = tmpDirection;
 
         // reverse the direction of all integers larger than k and build the result
-        final List<E> nextP = new ArrayList<E>();
+        final List<E> nextP = new ArrayList<>();
         for (int i = 0; i < keys.length; i++) {
             if (keys[i] > largestKey) {
                 direction[i] = !direction[i];

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java b/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java
index 7d19627..fdc1eb6 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java
@@ -39,7 +39,7 @@ public class PushbackIterator<E> implements Iterator<E> {
     private final Iterator<? extends E> iterator;
 
     /** The LIFO queue containing the pushed back items. */
-    private final Deque<E> items = new ArrayDeque<E>();
+    private final Deque<E> items = new ArrayDeque<>();
 
     //-----------------------------------------------------------------------
     /**
@@ -61,7 +61,7 @@ public class PushbackIterator<E> implements Iterator<E> {
             final PushbackIterator<E> it = (PushbackIterator<E>) iterator;
             return it;
         }
-        return new PushbackIterator<E>(iterator);
+        return new PushbackIterator<>(iterator);
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableIterator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableIterator.java b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableIterator.java
index bee6d25..4f7eb63 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableIterator.java
@@ -53,7 +53,7 @@ public final class UnmodifiableIterator<E> implements Iterator<E>, Unmodifiable
             final Iterator<E> tmpIterator = (Iterator<E>) iterator;
             return tmpIterator;
         }
-        return new UnmodifiableIterator<E>(iterator);
+        return new UnmodifiableIterator<>(iterator);
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableListIterator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableListIterator.java b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableListIterator.java
index 6861fd9..8b10417 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableListIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableListIterator.java
@@ -51,7 +51,7 @@ public final class UnmodifiableListIterator<E> implements ListIterator<E>, Unmod
             final ListIterator<E> tmpIterator = (ListIterator<E>) iterator;
             return tmpIterator;
         }
-        return new UnmodifiableListIterator<E>(iterator);
+        return new UnmodifiableListIterator<>(iterator);
     }
 
     //-----------------------------------------------------------------------


Mime
View raw message