Deleting unreachable logic (cache == null).
RELNOTES: None
@@ -137,12 +137,6 @@ final class RemoteActionContextProvider extends ActionContextProvider {
String strategyName = remoteOptions.remoteLocalFallbackStrategy;
for (ActionContext context : usedContexts) {
- if (context instanceof RemoteSpawnStrategy && cache == null) {
- throw new ExecutorInitException(
- "--remote_cache or --remote_executor should be initialized when using "
- + "--spawn_strategy=remote",
- ExitCode.COMMAND_LINE_ERROR);
- }
if (context instanceof AbstractSpawnStrategy) {
ExecutionStrategy annotation = context.getClass().getAnnotation(ExecutionStrategy.class);
if (annotation != null) {
@@ -167,8 +161,7 @@ final class RemoteActionContextProvider extends ActionContextProvider {
}
}
- /** Returns the remote cache object if any. */
- @Nullable
+ /** Returns the remote cache. */
RemoteCache getRemoteCache() {
return cache;
}
@@ -179,9 +172,7 @@ final class RemoteActionContextProvider extends ActionContextProvider {
@Override
public void executionPhaseEnding() {
- if (cache != null) {
cache.close();
- }
if (executor != null) {
executor.close();
}
