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 2019/08/06 12:42:18 UTC

[commons-io] branch master updated: Javadoc fixes.

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-io.git


The following commit(s) were added to refs/heads/master by this push:
     new 3e47930  Javadoc fixes.
3e47930 is described below

commit 3e4793090b1cb00cf7fcbe8334b4daca07ded6ed
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 6 08:42:15 2019 -0400

    Javadoc fixes.
---
 src/main/java/org/apache/commons/io/input/TeeInputStream.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/commons/io/input/TeeInputStream.java b/src/main/java/org/apache/commons/io/input/TeeInputStream.java
index a2b45f1..27d32b8 100644
--- a/src/main/java/org/apache/commons/io/input/TeeInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/TeeInputStream.java
@@ -30,8 +30,9 @@ import java.io.OutputStream;
  * stream.
  * <p>
  * The proxied input stream is closed when the {@link #close()} method is
- * called on this proxy. It is configurable whether the associated output
- * stream will also closed.
+ * called on this proxy. You may configure whether the input stream closes the
+ * output stream.
+ * </p>
  *
  * @since 1.4
  * @see ObservableInputStream
@@ -45,8 +46,7 @@ public class TeeInputStream extends ProxyInputStream {
     private final OutputStream branch;
 
     /**
-     * Flag for closing also the associated output stream when this
-     * stream is closed.
+     * Flag for closing the associated output stream when this stream is closed.
      */
     private final boolean closeBranch;
 
@@ -127,7 +127,7 @@ public class TeeInputStream extends ProxyInputStream {
     @Override
     public int read(final byte[] bts, final int st, final int end) throws IOException {
         final int n = super.read(bts, st, end);
-        if (n != -1) {
+        if (n != EOF) {
             branch.write(bts, st, n);
         }
         return n;