diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-07-19 09:05:09 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-07-19 09:05:09 +0200 |
commit | 82d052e1a5f5fe29d6603ef38435606569dd90fe (patch) | |
tree | 9d6dadb400b03579be6f923a44444ce5ba4b1b26 /sonar-plugin-api | |
parent | 89369f354b6f52a6dcc488127c1286525e48372a (diff) | |
download | sonarqube-82d052e1a5f5fe29d6603ef38435606569dd90fe.tar.gz sonarqube-82d052e1a5f5fe29d6603ef38435606569dd90fe.zip |
Fix Quality flaws
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/utils/command/CommandExecutor.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/command/CommandExecutor.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/command/CommandExecutor.java index 79ff15faf90..b546b2aca9b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/command/CommandExecutor.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/command/CommandExecutor.java @@ -24,6 +24,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; +import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; @@ -79,7 +80,7 @@ public class CommandExecutor { final Process finalProcess = process; executorService = Executors.newSingleThreadExecutor(); - Future<Integer> ft = executorService.submit(() -> finalProcess.waitFor()); + Future<Integer> ft = executorService.submit((Callable<Integer>) finalProcess::waitFor); int exitCode; if (timeoutMilliseconds < 0) { exitCode = ft.get(); |