aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/main
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-05-22 17:17:06 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-05-28 09:28:47 +0200
commit7934f95f388e4561fd630f9a834d8bd31432f7be (patch)
tree9b571743db4738a2e6de3113023908a5367f8dfe /sonar-plugin-api/src/main
parentce04507c53a5b84091781b1834c2cd657c2798cb (diff)
downloadsonarqube-7934f95f388e4561fd630f9a834d8bd31432f7be.tar.gz
sonarqube-7934f95f388e4561fd630f9a834d8bd31432f7be.zip
SONAR-6370 Remove coupling on guava 10 in CommandExecutor
Diffstat (limited to 'sonar-plugin-api/src/main')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/utils/command/CommandExecutor.java16
1 files changed, 7 insertions, 9 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 4c540b207a2..dfe44fabf42 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
@@ -19,12 +19,6 @@
*/
package org.sonar.api.utils.command;
-import com.google.common.io.Closeables;
-import org.sonar.api.utils.log.Logger;
-import org.sonar.api.utils.log.Loggers;
-
-import javax.annotation.Nullable;
-
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
@@ -35,6 +29,10 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
+import javax.annotation.Nullable;
+import org.apache.commons.io.IOUtils;
+import org.sonar.api.utils.log.Logger;
+import org.sonar.api.utils.log.Loggers;
/**
* Synchronously execute a native command line. It's much more limited than the Apache Commons Exec library.
@@ -144,9 +142,9 @@ public class CommandExecutor {
private void closeStreams(@Nullable Process process) {
if (process != null) {
- Closeables.closeQuietly(process.getInputStream());
- Closeables.closeQuietly(process.getOutputStream());
- Closeables.closeQuietly(process.getErrorStream());
+ IOUtils.closeQuietly(process.getInputStream());
+ IOUtils.closeQuietly(process.getOutputStream());
+ IOUtils.closeQuietly(process.getErrorStream());
}
}