git://wamblee.org
/
utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hibernate->JPA for authorization rules.
[utils]
/
support
/
general
/
src
/
main
/
java
/
org
/
wamblee
/
io
/
SimpleProcess.java
diff --git
a/support/general/src/main/java/org/wamblee/io/SimpleProcess.java
b/support/general/src/main/java/org/wamblee/io/SimpleProcess.java
index de93e547638d1db49d6c47e57be33665e83d37af..f0090f53215c0d6af3a80228329eddaed930b97e 100644
(file)
--- a/
support/general/src/main/java/org/wamblee/io/SimpleProcess.java
+++ b/
support/general/src/main/java/org/wamblee/io/SimpleProcess.java
@@
-27,6
+27,7
@@
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.StringWriter;
import java.io.Writer;
import java.io.PrintStream;
import java.io.StringWriter;
import java.io.Writer;
+import java.util.Arrays;
/**
*
/**
*
@@
-50,7
+51,7
@@
public class SimpleProcess {
*/
public SimpleProcess(File aDirectory, String[] aCmd) {
directory = aDirectory;
*/
public SimpleProcess(File aDirectory, String[] aCmd) {
directory = aDirectory;
- cmd =
aCmd
;
+ cmd =
Arrays.copyOf(aCmd, aCmd.length)
;
}
/**
}
/**
@@
-83,10
+84,10
@@
public class SimpleProcess {
private int runImpl() throws IOException {
try {
private int runImpl() throws IOException {
try {
- String
fullcmd = ""
;
+ String
Buffer fullcmd = new StringBuffer()
;
for (String part : cmd) {
for (String part : cmd) {
- fullcmd
+=
(" " + part);
+ fullcmd
.append
(" " + part);
}
LOG.debug("Executing '" + fullcmd + "' in directory '" + directory +
}
LOG.debug("Executing '" + fullcmd + "' in directory '" + directory +
@@
-182,10
+183,10
@@
public class SimpleProcess {
@Override
public String toString() {
@Override
public String toString() {
- String
fullcmd = ""
;
+ String
Buffer fullcmd = new StringBuffer()
;
for (String part : cmd) {
for (String part : cmd) {
- fullcmd
+=
(part + " ");
+ fullcmd
.append
(part + " ");
}
return "process(dir = '" + directory + "', cmd = '" + fullcmd + "')";
}
return "process(dir = '" + directory + "', cmd = '" + fullcmd + "')";