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 4efd2b2  Breaking binary compatibility should break the build instead 
of generating a report one might skip reading, especially for PRs.
4efd2b2 is described below

commit 4efd2b276417ff7299881e55293e91d791109451
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Jan 2 10:16:50 2021 -0500

    Breaking binary compatibility should break the build instead of
    generating a report one might skip reading, especially for PRs.
    
    Don't break BC.
    Javadoc verbs.
    Format Javadoc.
---
 pom.xml                                            |  2 --
 .../apache/commons/io/output/TeeOutputStream.java  | 35 ++++++++++++++--------
 2 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/pom.xml b/pom.xml
index 72191a5..43ecb43 100644
--- a/pom.xml
+++ b/pom.xml
@@ -308,8 +308,6 @@ file comparators, endian transformation classes, and much 
more.
     <spotbugs.plugin.version>4.1.4</spotbugs.plugin.version>
     <spotbugs.impl.version>4.2.0</spotbugs.impl.version>    
     <japicmp.skip>false</japicmp.skip>
-    <!-- generate report even if there are binary incompatible changes -->
-    
<commons.japicmp.breakBuildOnBinaryIncompatibleModifications>false</commons.japicmp.breakBuildOnBinaryIncompatibleModifications>
     <jacoco.skip>${env.JACOCO_SKIP}</jacoco.skip>
     <commons.release.isDistModule>true</commons.release.isDistModule>
     <commons.releaseManagerName>Gary Gregory</commons.releaseManagerName>    
diff --git a/src/main/java/org/apache/commons/io/output/TeeOutputStream.java 
b/src/main/java/org/apache/commons/io/output/TeeOutputStream.java
index 3f6ef5a..4db164b 100644
--- a/src/main/java/org/apache/commons/io/output/TeeOutputStream.java
+++ b/src/main/java/org/apache/commons/io/output/TeeOutputStream.java
@@ -20,17 +20,22 @@ import java.io.IOException;
 import java.io.OutputStream;
 
 /**
- * Classic splitter of {@link OutputStream}. Named after the Unix 'tee' 
command. It allows a stream to be branched off so there
- * are now two streams.
+ * Classic splitter of {@link OutputStream}. Named after the Unix 'tee' 
command. It allows a stream to be branched off
+ * so there are now two streams.
  */
 public class TeeOutputStream extends ProxyOutputStream {
 
-    /** the second OutputStream to write to */
-    protected final OutputStream branch; //TODO consider making this private
+    /**
+     * The second OutputStream to write to.
+     *
+     * TODO Make private and final in 3.0.
+     */
+    protected OutputStream branch;
 
     /**
      * Constructs a TeeOutputStream.
-     * @param out the main OutputStream
+     *
+     * @param out    the main OutputStream
      * @param branch the second OutputStream
      */
     public TeeOutputStream(final OutputStream out, final OutputStream branch) {
@@ -39,7 +44,8 @@ public class TeeOutputStream extends ProxyOutputStream {
     }
 
     /**
-     * Write the bytes to both streams.
+     * Writes the bytes to both streams.
+     *
      * @param b the bytes to write
      * @throws IOException if an I/O error occurs
      */
@@ -50,8 +56,9 @@ public class TeeOutputStream extends ProxyOutputStream {
     }
 
     /**
-     * Write the specified bytes to both streams.
-     * @param b the bytes to write
+     * Writes the specified bytes to both streams.
+     *
+     * @param b   the bytes to write
      * @param off The start offset
      * @param len The number of bytes to write
      * @throws IOException if an I/O error occurs
@@ -63,7 +70,8 @@ public class TeeOutputStream extends ProxyOutputStream {
     }
 
     /**
-     * Write a byte to both streams.
+     * Writes a byte to both streams.
+     *
      * @param b the byte to write
      * @throws IOException if an I/O error occurs
      */
@@ -75,6 +83,7 @@ public class TeeOutputStream extends ProxyOutputStream {
 
     /**
      * Flushes both streams.
+     *
      * @throws IOException if an I/O error occurs
      */
     @Override
@@ -85,14 +94,16 @@ public class TeeOutputStream extends ProxyOutputStream {
 
     /**
      * Closes both output streams.
-     *
+     * <p>
      * If closing the main output stream throws an exception, attempt to close 
the branch output stream.
+     * </p>
      *
+     * <p>
      * If closing the main and branch output streams both throw exceptions, 
which exceptions is thrown by this method is
      * currently unspecified and subject to change.
+     * </p>
      *
-     * @throws IOException
-     *             if an I/O error occurs
+     * @throws IOException if an I/O error occurs
      */
     @Override
     public void close() throws IOException {

Reply via email to