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

commit 713e964626fdcd9c9c99490d5e89b4b1211e46c9
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Tue Dec 26 16:52:37 2023 -0500

    Internal reuse
---
 .../org/apache/commons/io/input/BoundedInputStream.java   | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/main/java/org/apache/commons/io/input/BoundedInputStream.java 
b/src/main/java/org/apache/commons/io/input/BoundedInputStream.java
index 0cd2d59d..f1884b71 100644
--- a/src/main/java/org/apache/commons/io/input/BoundedInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/BoundedInputStream.java
@@ -143,30 +143,29 @@ public class BoundedInputStream extends ProxyInputStream {
      * Constructs a new {@link BoundedInputStream} that wraps the given input 
stream and limits it to a certain size.
      *
      * @param inputStream The wrapped input stream.
-     * @param maxLength   The maximum number of bytes to return.
+     * @param maxCount   The maximum number of bytes to return.
      * @deprecated Use {@link Builder#get()}.
      */
     @Deprecated
-    public BoundedInputStream(final InputStream inputStream, final long 
maxLength) {
-        // Some badly designed methods - e.g. the servlet API - overload length
+    public BoundedInputStream(final InputStream inputStream, final long 
maxCount) {
+        // Some badly designed methods - e.g. the Servlet API - overload length
         // such that "-1" means stream finished
-        super(inputStream);
-        this.maxCount = maxLength;
+        this(inputStream, maxCount, true);
     }
 
     /**
      * Constructs a new {@link BoundedInputStream} that wraps the given input 
stream and limits it to a certain size.
      *
      * @param inputStream    The wrapped input stream.
-     * @param maxLength      The maximum number of bytes to return.
+     * @param maxCount      The maximum number of bytes to return.
      * @param propagateClose {@code true} if calling {@link #close()} 
propagates to the {@code close()} method of the underlying stream or {@code 
false} if it
      *                       does not.
      */
-    private BoundedInputStream(final InputStream inputStream, final long 
maxLength, final boolean propagateClose) {
+    private BoundedInputStream(final InputStream inputStream, final long 
maxCount, final boolean propagateClose) {
         // Some badly designed methods - e.g. the Servlet API - overload length
         // such that "-1" means stream finished
         super(inputStream);
-        this.maxCount = maxLength;
+        this.maxCount = maxCount;
         this.propagateClose = propagateClose;
     }
 

Reply via email to