From 53f223d3e397fe04ea76bf445e2db37fd09753be Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Fri, 14 Feb 2020 18:51:24 -0500 Subject: [PATCH] Remove redundant type arguments. Use final. --- src/main/java/org/apache/commons/lang3/Streams.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/Streams.java b/src/main/java/org/apache/commons/lang3/Streams.java index 6a3572583..07a400d1a 100644 --- a/src/main/java/org/apache/commons/lang3/Streams.java +++ b/src/main/java/org/apache/commons/lang3/Streams.java @@ -439,13 +439,13 @@ public class Streams { private static final Set characteristics = Collections.emptySet(); private final Class elementType; - public ArrayCollector(Class pElementType) { + public ArrayCollector(final Class pElementType) { elementType = pElementType; } @Override public Supplier> supplier() { - return () -> new ArrayList(); + return () -> new ArrayList<>(); } @Override @@ -487,7 +487,7 @@ public class Streams { * @return a {@code Collector} which collects all the input elements into an * array, in encounter order */ - public static Collector toArray(Class pElementType) { - return new ArrayCollector(pElementType); + public static Collector toArray(final Class pElementType) { + return new ArrayCollector<>(pElementType); } }