Skip to content

Commit

Permalink
Merge pull request #31 from TheRoddyWMS/fix-multithreading-bug-upon-p…
Browse files Browse the repository at this point in the history
…arallel-read-of-stdout-stderr

Substituted StringBuilder by StringBuffer for thread-safety
  • Loading branch information
vinjana committed Oct 22, 2020
2 parents fff4594 + 8eed174 commit bd32bf6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class LocalExecutionHelper {
if (outputStream)
process.waitForProcessOutput(outputStream, outputStream)
else {
StringBuilder sstream = new StringBuilder();
StringBuffer sstream = new StringBuffer();
process.waitForProcessOutput(sstream, sstream);
lines = sstream.readLines().collect { String l -> return l.toString(); };
}
Expand All @@ -106,4 +106,4 @@ class LocalExecutionHelper {
}
return "";
}
}
}

0 comments on commit bd32bf6

Please sign in to comment.