From 4e0af7cb56f2886f4e2c2457abd8950a5ccaf9fe Mon Sep 17 00:00:00 2001 From: Krishnaveni Chitrapu Date: Fri, 11 Nov 2022 12:18:27 +0100 Subject: [PATCH] replace MoreExecutors.directExecutor() with executor() function --- .../java/org/ndgf/endit/AbstractEnditNearlineStorage.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/ndgf/endit/AbstractEnditNearlineStorage.java b/src/main/java/org/ndgf/endit/AbstractEnditNearlineStorage.java index cd39c65..69c1f23 100644 --- a/src/main/java/org/ndgf/endit/AbstractEnditNearlineStorage.java +++ b/src/main/java/org/ndgf/endit/AbstractEnditNearlineStorage.java @@ -22,7 +22,6 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; -import com.google.common.util.concurrent.MoreExecutors; import java.io.IOException; import java.net.URI; @@ -127,7 +126,7 @@ public ListenableFuture> apply(Void ignored) throws Exception return schedule(task); } } - }, MoreExecutors.directExecutor()); + }, executor()); } @Override @@ -143,7 +142,7 @@ public ListenableFuture apply(Void ignored) throws Exception { return request.allocate(); } - }, MoreExecutors.directExecutor()), + }, executor()), new AsyncFunction>() { @Override @@ -156,6 +155,6 @@ public ListenableFuture> apply(Void ignored) throws Exception return schedule(task); } } - }, MoreExecutors.directExecutor()); + }, executor()); } }