You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/09/23 18:10:33 UTC

[commons-exec] 03/03: PMD: Wow

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-exec.git

commit 7905376655b4fc693afcc7b1c3582c55a3fee6ac
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Sep 23 14:10:26 2022 -0400

    PMD: Wow
---
 src/main/java/org/apache/commons/exec/PumpStreamHandler.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/exec/PumpStreamHandler.java b/src/main/java/org/apache/commons/exec/PumpStreamHandler.java
index a75fdc5..e0281c1 100644
--- a/src/main/java/org/apache/commons/exec/PumpStreamHandler.java
+++ b/src/main/java/org/apache/commons/exec/PumpStreamHandler.java
@@ -256,8 +256,7 @@ public class PumpStreamHandler implements ExecuteStreamHandler {
      * @return the stream pumper thread
      */
     protected Thread createPump(final InputStream is, final OutputStream os) {
-        final boolean closeWhenExhausted = os instanceof PipedOutputStream ? true : false;
-        return createPump(is, os, closeWhenExhausted);
+        return createPump(is, os, os instanceof PipedOutputStream);
     }
 
     /**