diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2012-04-04 15:00:47 +0600 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2012-04-04 15:00:47 +0600 |
commit | 0d284e6c1a5105c396ab85273de2af30b6d63847 (patch) | |
tree | 7ab8a22fd73414f63b3c1b3d62e7f204ba7206d9 /sonar-plugin-api | |
parent | ac21ddcd4159c2f96eed8f2b615b0fcd90d6b244 (diff) | |
download | sonarqube-0d284e6c1a5105c396ab85273de2af30b6d63847.tar.gz sonarqube-0d284e6c1a5105c396ab85273de2af30b6d63847.zip |
SONAR-3318 Fix handling of exceptions in CommandExecutor
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/utils/command/CommandExecutor.java | 2 |
1 files changed, 2 insertions, 0 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 8ec3bf2cb66..214674029c3 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 @@ -80,6 +80,8 @@ public final class CommandExecutor { executorService = Executors.newSingleThreadExecutor(); Future<Integer> ft = executorService.submit(call); int exitCode = ft.get(timeoutMilliseconds, TimeUnit.MILLISECONDS); + waitUntilFinish(outputGobbler); + waitUntilFinish(errorGobbler); if (outputGobbler.getException() != null) { throw new CommandException(command, "Error inside stdOut parser", outputGobbler.getException()); } |