Author: sgoeschl Date: Tue Feb 17 23:12:26 2009 New Revision: 745288 URL: http://svn.apache.org/viewvc?rev=745288&view=rev Log: [EXEC-32] Messed up with the code
+) I had to manually apply the patch since the files had changed in the meantime so I incorrectly called createProcessOutputPump(). +) looking at the code I thought some cleanup such as setting the stream variables to null would be quite good but overlooked testStability() reuses the StreamHandler - so the second invocation was always broken. Thanks to Continuum (and probably Brett Porter maintaining it for commons) to allow narrowing my search quickly ... Modified: commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/PumpStreamHandler.java Modified: commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/PumpStreamHandler.java URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/PumpStreamHandler.java?rev=745288&r1=745287&r2=745288&view=diff ============================================================================== --- commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/PumpStreamHandler.java (original) +++ commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/PumpStreamHandler.java Tue Feb 17 23:12:26 2009 @@ -100,7 +100,6 @@ if (out != null) { createProcessOutputPump(is, out); } - createProcessOutputPump(is, out); } /** @@ -186,7 +185,6 @@ if (err != null && err != out) { try { err.flush(); - err = null; } catch (IOException e) { String msg = "Got exception while flushing the error stream"; DebugUtils.handleException(msg ,e); @@ -196,7 +194,6 @@ if (out != null) { try { out.flush(); - out = null; } catch (IOException e) { String msg = "Got exception while flushing the output stream"; DebugUtils.handleException(msg ,e);