There seems to be a bug in consumeProcessOutput that leads to the effect that the output captured in a StringBuilder is not available at the time it is accessed even after a waitFor(). The following code shows the behavior. (Tested on the listed versions.)
Adding a short sleep after waitFor "fixes" the issue. I expect the threads used to consume the output are not joined in waitFor but did not look deeper into the issue. If you need additional information, feel free to ask!