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 2023/01/23 11:36:05 UTC
[commons-compress] 01/03: Reuse stock functional interfaces
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-compress.git
commit c11e633274cbe3314daf87d2ea52659daa611b19
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Jan 23 06:29:54 2023 -0500
Reuse stock functional interfaces
---
.../archivers/zip/ParallelScatterZipCreatorTest.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java
index cadfb2ac..4e7e7793 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java
@@ -38,6 +38,8 @@ import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
+import java.util.function.Consumer;
+import java.util.function.Function;
import java.util.zip.Deflater;
import java.util.zip.ZipEntry;
@@ -50,12 +52,14 @@ import org.junit.jupiter.api.Test;
public class ParallelScatterZipCreatorTest {
- private interface CallableConsumer {
- void accept(Callable<? extends ScatterZipOutputStream> c);
+ private interface CallableConsumer extends Consumer<Callable<? extends ScatterZipOutputStream>> {
+ // empty
}
- private interface CallableConsumerSupplier {
- CallableConsumer apply(ParallelScatterZipCreator zipCreator);
+
+ private interface CallableConsumerSupplier extends Function<ParallelScatterZipCreator, CallableConsumer> {
+ // empty
}
+
private static final long EXPECTED_FILE_SIZE = 1024 * 1024; // 1MB
private static final int EXPECTED_FILES_NUMBER = 50;