From 2d86ac6ecf24939e665a08be2f07fa144120990f Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Tue, 25 May 2021 13:36:29 -0400 Subject: [PATCH] Lambdas. --- src/main/java/org/apache/commons/lang3/Streams.java | 4 +--- src/main/java/org/apache/commons/lang3/stream/Streams.java | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/Streams.java b/src/main/java/org/apache/commons/lang3/Streams.java index 58ab429fa..c284944f9 100644 --- a/src/main/java/org/apache/commons/lang3/Streams.java +++ b/src/main/java/org/apache/commons/lang3/Streams.java @@ -478,9 +478,7 @@ public class Streams { @Override public Function, O[]> finisher() { - return list -> { - return list.toArray(ArrayUtils.newInstance(elementType, list.size())); - }; + return list -> list.toArray(ArrayUtils.newInstance(elementType, list.size())); } @Override diff --git a/src/main/java/org/apache/commons/lang3/stream/Streams.java b/src/main/java/org/apache/commons/lang3/stream/Streams.java index cfad60c89..7022210a2 100644 --- a/src/main/java/org/apache/commons/lang3/stream/Streams.java +++ b/src/main/java/org/apache/commons/lang3/stream/Streams.java @@ -104,9 +104,7 @@ public class Streams { @Override public Function, O[]> finisher() { - return list -> { - return list.toArray(ArrayUtils.newInstance(elementType, list.size())); - }; + return list -> list.toArray(ArrayUtils.newInstance(elementType, list.size())); } @Override