Skip to content

Commit

Permalink
[JENKINS-19465] - Even more FindBugs
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-nenashev committed Nov 21, 2017
1 parent 7051b60 commit 890a7e6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
Expand Up @@ -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;
Expand Down

0 comments on commit 890a7e6

Please sign in to comment.