You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/11/20 16:25:07 UTC

[commons-collections] branch master updated: Use lambda.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git


The following commit(s) were added to refs/heads/master by this push:
     new 210b461  Use lambda.
210b461 is described below

commit 210b461d24a92be239bf81df12c9421c39911148
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 20 11:25:02 2020 -0500

    Use lambda.
---
 .../bloomfilter/ArrayCountingBloomFilterTest.java            | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/ArrayCountingBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/ArrayCountingBloomFilterTest.java
index 2684713..e7fc7bf 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/ArrayCountingBloomFilterTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/ArrayCountingBloomFilterTest.java
@@ -40,14 +40,10 @@ public class ArrayCountingBloomFilterTest extends AbstractBloomFilterTest {
     /**
      * Function to convert int arrays to BloomFilters for testing.
      */
-    private Function<int[], BloomFilter> converter = new Function<int[], BloomFilter>() {
-
-        @Override
-        public BloomFilter apply(int[] counts) {
-            BloomFilter testingFilter = new BitSetBloomFilter(shape);
-            testingFilter.merge(new FixedIndexesTestHasher(shape, counts));
-            return testingFilter;
-        }
+    private Function<int[], BloomFilter> converter = counts -> {
+        BloomFilter testingFilter = new BitSetBloomFilter(shape);
+        testingFilter.merge(new FixedIndexesTestHasher(shape, counts));
+        return testingFilter;
     };
 
     @Override