summaryrefslogtreecommitdiffstats
path: root/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/CommandExecutor.java
diff options
context:
space:
mode:
Diffstat (limited to 'node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/CommandExecutor.java')
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/CommandExecutor.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/CommandExecutor.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/CommandExecutor.java
index e1d0e46c173..eac0bc574c3 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/CommandExecutor.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/CommandExecutor.java
@@ -10,16 +10,19 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.StringReader;
import java.util.ArrayList;
+import java.util.List;
/**
- * Created by olaa on 03/07/2017.
* Wrapper for executing terminal commands
+ *
+ * @author olaaun
+ * @author sgrostad
*/
public class CommandExecutor {
- public ArrayList<String> executeCommand(String command) throws IOException {
+ public List<String> executeCommand(String command) throws IOException {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- ArrayList<String> results = new ArrayList<>();
+ List<String> results = new ArrayList<>();
writeToOutputStream(outputStream, command);
writeOutputStreamToResults(outputStream, results);
return results;
@@ -35,7 +38,7 @@ public class CommandExecutor {
executor.execute(cmdLine);
}
- private void writeOutputStreamToResults(ByteArrayOutputStream outputStream, ArrayList<String> results) throws IOException {
+ private void writeOutputStreamToResults(ByteArrayOutputStream outputStream, List<String> results) throws IOException {
String out = outputStream.toString();
BufferedReader br = new BufferedReader(new StringReader(out));
String line;