Always pass an Executor to Futures methods

Among the Futures methods that run user callbacks, those that don't take
an Executor will be deleted. This change migrates them to the
counterparts that take MoreExecutors.directExecutor() as such Executor
in the parameter list, exactly the way that the old method works.

PiperOrigin-RevId: 148985066
Change-Id: I38bb9f442cbbc795b2c66a023850d0d35d255aeb
This commit is contained in:
Gerrit Code Review
2017-03-02 11:07:37 +00:00
committed by Dave Borowitz
parent 48e08d7776
commit 3249313b63
2 changed files with 6 additions and 2 deletions

View File

@@ -14,6 +14,7 @@
package com.google.gerrit.lucene;
import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import com.google.common.base.Joiner;
@@ -288,7 +289,8 @@ public abstract class AbstractLuceneIndex<K, V> implements Index<K, V> {
reopenThread.waitForGeneration(gen, 0);
return new NrtFuture(gen);
}
});
},
directExecutor());
}
@Override