aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-07-19 19:26:15 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2016-07-20 14:47:14 +0200
commitb06fb8e9b04ed583b38ecb5ebaaaa9822988dac4 (patch)
tree09b81ebdbac1cd6f9c4f3fdafe93f681083fd67b
parentdf745897a5324ab8e758c41a061c60ef1ebeafa4 (diff)
downloadsonarqube-b06fb8e9b04ed583b38ecb5ebaaaa9822988dac4.tar.gz
sonarqube-b06fb8e9b04ed583b38ecb5ebaaaa9822988dac4.zip
Fix Quality flaw
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/utils/command/CommandExecutor.java3
1 files changed, 1 insertions, 2 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 b546b2aca9b..2c68874a029 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
@@ -78,9 +78,8 @@ public class CommandExecutor {
outputGobbler.start();
errorGobbler.start();
- final Process finalProcess = process;
executorService = Executors.newSingleThreadExecutor();
- Future<Integer> ft = executorService.submit((Callable<Integer>) finalProcess::waitFor);
+ Future<Integer> ft = executorService.submit((Callable<Integer>) process::waitFor);
int exitCode;
if (timeoutMilliseconds < 0) {
exitCode = ft.get();