Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[JENKINS-19465] - Even more FindBugs
- Loading branch information
Showing
with
4 additions
and
3 deletions.
-
+4
−3
src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
|
@@ -849,13 +849,14 @@ public Boolean call() throws InterruptedException { |
|
|
try { |
|
|
long time = System.currentTimeMillis(); |
|
|
List<Future<Boolean>> results; |
|
|
if (launcherExecutorService == null) { |
|
|
final ExecutorService srv = launcherExecutorService; |
|
|
if (srv == null) { |
|
|
throw new IllegalStateException("Launcher Executor Service should be always non-null here, because the task allocates and closes service on its own"); |
|
|
} |
|
|
if (this.getLaunchTimeoutMillis() > 0) { |
|
|
results = launcherExecutorService.invokeAll(callables, this.getLaunchTimeoutMillis(), TimeUnit.MILLISECONDS); |
|
|
results = srv.invokeAll(callables, this.getLaunchTimeoutMillis(), TimeUnit.MILLISECONDS); |
|
|
} else { |
|
|
results = launcherExecutorService.invokeAll(callables); |
|
|
results = srv.invokeAll(callables); |
|
|
} |
|
|
long duration = System.currentTimeMillis() - time; |
|
|
Boolean res; |
|
|