HADOOP-19011. Possible ConcurrentModificationException if Exec command fails (#6353)
This commit is contained in:
parent
16edb4ac96
commit
cf21f35526
@ -72,14 +72,14 @@ public int run(List<String> command, List<String> output,
|
||||
stdOut.start();
|
||||
stdErr.start();
|
||||
retCode = p.waitFor();
|
||||
stdOut.join();
|
||||
stdErr.join();
|
||||
if (retCode != 0) {
|
||||
mojo.getLog().warn(command + " failed with error code " + retCode);
|
||||
for (String s : stdErr.getOutput()) {
|
||||
mojo.getLog().debug(s);
|
||||
}
|
||||
}
|
||||
stdOut.join();
|
||||
stdErr.join();
|
||||
output.addAll(stdOut.getOutput());
|
||||
if (errors != null) {
|
||||
errors.addAll(stdErr.getOutput());
|
||||
|
Loading…
Reference in New Issue
Block a user