diff options
author | 2017-12-19 05:44:28 -0800 | |
---|---|---|
committer | 2017-12-19 05:46:00 -0800 | |
commit | 8d92cd83c3399d78825c5d9c7fe43c6e8990f38d (patch) | |
tree | 914ffcd5731717d652565118668daeb90e02685b /src/main/java/com/google/devtools | |
parent | 7f86d4a34bbd76295b8753ffc2740e43aa228fc2 (diff) |
Remove some unused code
PiperOrigin-RevId: 179542482
Diffstat (limited to 'src/main/java/com/google/devtools')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java | 13 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/exec/ExecutorBuilder.java | 18 |
2 files changed, 4 insertions, 27 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java b/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java index ccd939d3ec..ea4c801fc5 100644 --- a/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java +++ b/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java @@ -223,15 +223,10 @@ public class ExecutionTool { } }); - ActionInputFileCache cache = builder.getActionInputFileCache(); - if (cache == null) { - // Unfortunately, the exec root cache is not shared with caches in the remote execution - // client. - cache = - new SingleBuildFileCache( - env.getExecRoot().getPathString(), env.getRuntime().getFileSystem()); - } - this.fileCache = cache; + // Unfortunately, the exec root cache is not shared with caches in the remote execution client. + this.fileCache = + new SingleBuildFileCache( + env.getExecRoot().getPathString(), env.getRuntime().getFileSystem()); this.prefetcher = builder.getActionInputPrefetcher(); this.actionContextProviders = builder.getActionContextProviders(); diff --git a/src/main/java/com/google/devtools/build/lib/exec/ExecutorBuilder.java b/src/main/java/com/google/devtools/build/lib/exec/ExecutorBuilder.java index 7549519ca0..398e183c43 100644 --- a/src/main/java/com/google/devtools/build/lib/exec/ExecutorBuilder.java +++ b/src/main/java/com/google/devtools/build/lib/exec/ExecutorBuilder.java @@ -16,12 +16,10 @@ package com.google.devtools.build.lib.exec; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.actions.ActionContext; -import com.google.devtools.build.lib.actions.ActionInputFileCache; import com.google.devtools.build.lib.actions.ActionInputPrefetcher; import com.google.devtools.build.lib.actions.Executor; import java.util.ArrayList; import java.util.List; -import javax.annotation.Nullable; /** * Builder class to create an {@link Executor} instance. This class is part of the module API, @@ -30,7 +28,6 @@ import javax.annotation.Nullable; public class ExecutorBuilder { private final List<ActionContextProvider> actionContextProviders = new ArrayList<>(); private final List<ActionContextConsumer> actionContextConsumers = new ArrayList<>(); - private ActionInputFileCache cache; private ActionInputPrefetcher prefetcher; // These methods shouldn't be public, but they have to be right now as ExecutionTool is in another @@ -43,11 +40,6 @@ public class ExecutorBuilder { return ImmutableList.copyOf(actionContextConsumers); } - @Nullable - public ActionInputFileCache getActionInputFileCache() { - return cache; - } - public ActionInputPrefetcher getActionInputPrefetcher() { return prefetcher == null ? ActionInputPrefetcher.NONE : prefetcher; } @@ -77,16 +69,6 @@ public class ExecutorBuilder { } /** - * Sets the cache for action input files. Only one module may set the cache. If multiple modules - * set it, this method will throw an {@link IllegalStateException}. - */ - public ExecutorBuilder setActionInputFileCache(ActionInputFileCache cache) { - Preconditions.checkState(this.cache == null); - this.cache = Preconditions.checkNotNull(cache); - return this; - } - - /** * Sets the action input prefetcher. Only one module may set the prefetcher. If multiple modules * set it, this method will throw an {@link IllegalStateException}. */ |