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 2024/08/06 13:34:50 UTC

(commons-io) branch master updated (1a2cfc8dc -> a7e7dda39)

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

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


    from 1a2cfc8dc Avoid NullPointerException in ProxyInputStream.markSupported() when the underlying input stream is null
     new 10c506d35 Refactor test
     new 4a7bc11e0 Avoid NullPointerException in ProxyInputStream.mark(int) when the underlying input stream is null
     new cb0ccf943 Javadoc markSupported()
     new 54bbab7d8 Javadoc
     new 27414737c Update inline comment
     new 8056c9a4c Javadoc
     new a1ef0989f Javadoc
     new 07f1df648 Javadoc
     new 3ee38babe Javadoc
     new a7e7dda39 Javadoc

The 10 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/changes/changes.xml                            |  1 +
 src/main/java/org/apache/commons/io/IOUtils.java   | 18 +++---
 .../apache/commons/io/input/ProxyInputStream.java  | 68 +++++++++++++---------
 .../commons/io/input/ProxyInputStreamTest.java     | 20 ++++++-
 4 files changed, 70 insertions(+), 37 deletions(-)


(commons-io) 10/10: Javadoc

Posted by gg...@apache.org.
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 a7e7dda39ca8b09fdf3bec388b3eb39a454370ce
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 6 09:23:22 2024 -0400

    Javadoc
---
 .../apache/commons/io/input/ProxyInputStream.java  | 37 +++++++++++-----------
 1 file changed, 18 insertions(+), 19 deletions(-)

diff --git a/src/main/java/org/apache/commons/io/input/ProxyInputStream.java b/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
index cb0cef697..fd43678e8 100644
--- a/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
@@ -23,6 +23,7 @@ import java.io.IOException;
 import java.io.InputStream;
 
 import org.apache.commons.io.IOUtils;
+import org.apache.commons.io.function.Erase;
 import org.apache.commons.io.function.IOConsumer;
 
 /**
@@ -59,10 +60,8 @@ public abstract class ProxyInputStream extends FilterInputStream {
      * @param proxy  the InputStream to proxy.
      */
     public ProxyInputStream(final InputStream proxy) {
-        // the proxy is stored in a protected superclass variable named 'in'
-        this(proxy, e -> {
-            throw e;
-        });
+        // the proxy is stored in a protected superclass variable named 'in'.
+        this(proxy, Erase::rethrow);
     }
 
     /**
@@ -79,7 +78,7 @@ public abstract class ProxyInputStream extends FilterInputStream {
 
     /**
      * Invoked by the {@code read} methods after the proxied call has returned
-     * successfully. The number of bytes returned to the caller (or -1 if
+     * successfully. The number of bytes returned to the caller (or {@link IOUtils#EOF EOF} if
      * the end of stream was reached) is given as an argument.
      * <p>
      * Subclasses can override this method to add common post-processing
@@ -93,7 +92,7 @@ public abstract class ProxyInputStream extends FilterInputStream {
      * </p>
      *
      * @since 2.0
-     * @param n number of bytes read, or -1 if the end of stream was reached.
+     * @param n number of bytes read, or {@link IOUtils#EOF EOF} if the end of stream was reached.
      * @throws IOException if the post-processing fails in a subclass.
      */
     @SuppressWarnings("unused") // Possibly thrown from subclasses.
@@ -162,7 +161,7 @@ public abstract class ProxyInputStream extends FilterInputStream {
      * handling. The default behavior is to re-throw the exception.
      * </p>
      *
-     * @param e The IOException thrown
+     * @param e The IOException thrown.
      * @throws IOException if an I/O error occurs.
      * @since 2.0
      */
@@ -182,7 +181,7 @@ public abstract class ProxyInputStream extends FilterInputStream {
     /**
      * Invokes the delegate's {@link InputStream#mark(int)} method.
      *
-     * @param readLimit read ahead limit
+     * @param readLimit read ahead limit.
      */
     @Override
     public synchronized void mark(final int readLimit) {
@@ -206,7 +205,7 @@ public abstract class ProxyInputStream extends FilterInputStream {
     /**
      * Invokes the delegate's {@link InputStream#read()} method unless the stream is closed.
      *
-     * @return the byte read or {@link IOUtils#EOF EOF} if the end of stream
+     * @return the byte read or {@link IOUtils#EOF EOF} if we reached the end of stream.
      * @throws IOException if an I/O error occurs.
      */
     @Override
@@ -228,8 +227,8 @@ public abstract class ProxyInputStream extends FilterInputStream {
     /**
      * Invokes the delegate's {@link InputStream#read(byte[])} method.
      *
-     * @param b the buffer to read the bytes into
-     * @return the number of bytes read or {@link IOUtils#EOF EOF} if the end of stream
+     * @param b the buffer to read the bytes into.
+     * @return the number of bytes read or {@link IOUtils#EOF EOF} if we reached the end of stream.
      * @throws IOException
      *                     <ul>
      *                     <li>If the first byte cannot be read for any reason other than the end of the file,
@@ -253,10 +252,10 @@ public abstract class ProxyInputStream extends FilterInputStream {
     /**
      * Invokes the delegate's {@link InputStream#read(byte[], int, int)} method.
      *
-     * @param b   the buffer to read the bytes into
-     * @param off The start offset
-     * @param len The number of bytes to read
-     * @return the number of bytes read or {@link IOUtils#EOF EOF} if the end of stream
+     * @param b   the buffer to read the bytes into.
+     * @param off The start offset.
+     * @param len The number of bytes to read.
+     * @return the number of bytes read or {@link IOUtils#EOF EOF} if we reached the end of stream.
      * @throws IOException
      *                     <ul>
      *                     <li>If the first byte cannot be read for any reason other than the end of the file,
@@ -280,7 +279,7 @@ public abstract class ProxyInputStream extends FilterInputStream {
     /**
      * Invokes the delegate's {@link InputStream#reset()} method.
      *
-     * @throws IOException if an I/O error occurs.
+     * @throws IOException if this stream has not been marked or if the mark has been invalidated.
      */
     @Override
     public synchronized void reset() throws IOException {
@@ -303,9 +302,9 @@ public abstract class ProxyInputStream extends FilterInputStream {
     /**
      * Invokes the delegate's {@link InputStream#skip(long)} method.
      *
-     * @param n the number of bytes to skip
-     * @return the actual number of bytes skipped
-     * @throws IOException if an I/O error occurs.
+     * @param n the number of bytes to skip.
+     * @return the actual number of bytes skipped.
+     * @throws IOException if the stream does not support seek, or if some other I/O error occurs.
      */
     @Override
     public long skip(final long n) throws IOException {


(commons-io) 05/10: Update inline comment

Posted by gg...@apache.org.
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 27414737ce71fbe81b8cd3e9be6be3512576c611
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 6 08:56:15 2024 -0400

    Update inline comment
---
 src/main/java/org/apache/commons/io/input/ProxyInputStream.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/io/input/ProxyInputStream.java b/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
index f811899b5..6b7c68ebb 100644
--- a/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
@@ -72,7 +72,7 @@ public abstract class ProxyInputStream extends FilterInputStream {
      * @param exceptionHandler the exception handler.
      */
     ProxyInputStream(final InputStream proxy, final IOConsumer<IOException> exceptionHandler) {
-        // the proxy is stored in a protected superclass variable named 'in'
+        // the proxy is stored in a protected superclass instance variable named 'in'.
         super(proxy);
         this.exceptionHandler = exceptionHandler;
     }


(commons-io) 01/10: Refactor test

Posted by gg...@apache.org.
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 10c506d35cf0511751c6193c3ff0d76f6cf1cebb
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 6 08:46:24 2024 -0400

    Refactor test
---
 .../java/org/apache/commons/io/input/ProxyInputStreamTest.java     | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/io/input/ProxyInputStreamTest.java b/src/test/java/org/apache/commons/io/input/ProxyInputStreamTest.java
index 6518f75ee..5dd5075c6 100644
--- a/src/test/java/org/apache/commons/io/input/ProxyInputStreamTest.java
+++ b/src/test/java/org/apache/commons/io/input/ProxyInputStreamTest.java
@@ -82,6 +82,11 @@ public class ProxyInputStreamTest<T extends ProxyInputStream> {
         return (T) new ProxyInputStreamFixture(createOriginInputStream());
     }
 
+    @SuppressWarnings("unchecked")
+    protected T createFixture(final InputStream proxy) {
+        return (T) new ProxyInputStreamFixture(proxy);
+    }
+
     protected InputStream createOriginInputStream() {
         return CharSequenceInputStream.builder().setCharSequence("abc").get();
     }
@@ -114,7 +119,7 @@ public class ProxyInputStreamTest<T extends ProxyInputStream> {
 
     @Test
     public void testAvailableNull() throws IOException {
-        try (ProxyInputStreamFixture inputStream = new ProxyInputStreamFixture(null)) {
+        try (T inputStream = createFixture(null)) {
             assertEquals(0, inputStream.available());
             inputStream.setIn(createFixture());
             assertEquals(3, inputStream.available());


(commons-io) 04/10: Javadoc

Posted by gg...@apache.org.
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 54bbab7d8862f16ef1945da6082fd21775cd3796
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 6 08:56:06 2024 -0400

    Javadoc
---
 src/main/java/org/apache/commons/io/input/ProxyInputStream.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/io/input/ProxyInputStream.java b/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
index a0b6241b8..f811899b5 100644
--- a/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
@@ -230,7 +230,12 @@ public abstract class ProxyInputStream extends FilterInputStream {
      *
      * @param b the buffer to read the bytes into
      * @return the number of bytes read or EOF if the end of stream
-     * @throws IOException if an I/O error occurs.
+     * @exception IOException
+     *                        <ul>
+     *                        <li>If the first byte cannot be read for any reason other than the end of the file,
+     *                        <li>if the input stream has been closed, or</li>
+     *                        <li>if some other I/O error occurs.</li>
+     *                        </ul>
      */
     @Override
     public int read(final byte[] b) throws IOException {


(commons-io) 08/10: Javadoc

Posted by gg...@apache.org.
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 07f1df648bf3e77ce2d07d7dd8c0cf2e87545440
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 6 09:02:54 2024 -0400

    Javadoc
---
 .../java/org/apache/commons/io/input/ProxyInputStream.java  | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/commons/io/input/ProxyInputStream.java b/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
index 6b7c68ebb..098fe39ef 100644
--- a/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
@@ -206,7 +206,7 @@ public abstract class ProxyInputStream extends FilterInputStream {
     /**
      * Invokes the delegate's {@link InputStream#read()} method unless the stream is closed.
      *
-     * @return the byte read or -1 if the end of stream
+     * @return the byte read or {@link IOUtils#EOF EOF} if the end of stream
      * @throws IOException if an I/O error occurs.
      */
     @Override
@@ -229,7 +229,7 @@ public abstract class ProxyInputStream extends FilterInputStream {
      * Invokes the delegate's {@link InputStream#read(byte[])} method.
      *
      * @param b the buffer to read the bytes into
-     * @return the number of bytes read or EOF if the end of stream
+     * @return the number of bytes read or {@link IOUtils#EOF EOF} if the end of stream
      * @exception IOException
      *                        <ul>
      *                        <li>If the first byte cannot be read for any reason other than the end of the file,
@@ -256,7 +256,7 @@ public abstract class ProxyInputStream extends FilterInputStream {
      * @param b the buffer to read the bytes into
      * @param off The start offset
      * @param len The number of bytes to read
-     * @return the number of bytes read or -1 if the end of stream
+     * @return the number of bytes read or {@link IOUtils#EOF EOF} if the end of stream
      * @throws IOException if an I/O error occurs.
      */
     @Override
@@ -313,11 +313,12 @@ public abstract class ProxyInputStream extends FilterInputStream {
     }
 
     /**
-     * Unwraps this instance by returning the underlying InputStream.
+     * Unwraps this instance by returning the underlying {@link InputStream}.
      * <p>
-     * Use with caution; useful to query the underlying InputStream.
+     * Use with caution; useful to query the underlying {@link InputStream}.
      * </p>
-     * @return the underlying InputStream.
+     *
+     * @return the underlying {@link InputStream}.
      * @since 2.16.0
      */
     public InputStream unwrap() {


(commons-io) 09/10: Javadoc

Posted by gg...@apache.org.
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 3ee38babe6aa3ceab8c80a5d735bcae9522a6cd3
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 6 09:03:33 2024 -0400

    Javadoc
---
 .../apache/commons/io/input/ProxyInputStream.java   | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/main/java/org/apache/commons/io/input/ProxyInputStream.java b/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
index 098fe39ef..cb0cef697 100644
--- a/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
@@ -230,12 +230,12 @@ public abstract class ProxyInputStream extends FilterInputStream {
      *
      * @param b the buffer to read the bytes into
      * @return the number of bytes read or {@link IOUtils#EOF EOF} if the end of stream
-     * @exception IOException
-     *                        <ul>
-     *                        <li>If the first byte cannot be read for any reason other than the end of the file,
-     *                        <li>if the input stream has been closed, or</li>
-     *                        <li>if some other I/O error occurs.</li>
-     *                        </ul>
+     * @throws IOException
+     *                     <ul>
+     *                     <li>If the first byte cannot be read for any reason other than the end of the file,
+     *                     <li>if the input stream has been closed, or</li>
+     *                     <li>if some other I/O error occurs.</li>
+     *                     </ul>
      */
     @Override
     public int read(final byte[] b) throws IOException {
@@ -253,11 +253,16 @@ public abstract class ProxyInputStream extends FilterInputStream {
     /**
      * Invokes the delegate's {@link InputStream#read(byte[], int, int)} method.
      *
-     * @param b the buffer to read the bytes into
+     * @param b   the buffer to read the bytes into
      * @param off The start offset
      * @param len The number of bytes to read
      * @return the number of bytes read or {@link IOUtils#EOF EOF} if the end of stream
-     * @throws IOException if an I/O error occurs.
+     * @throws IOException
+     *                     <ul>
+     *                     <li>If the first byte cannot be read for any reason other than the end of the file,
+     *                     <li>if the input stream has been closed, or</li>
+     *                     <li>if some other I/O error occurs.</li>
+     *                     </ul>
      */
     @Override
     public int read(final byte[] b, final int off, final int len) throws IOException {


(commons-io) 06/10: Javadoc

Posted by gg...@apache.org.
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 8056c9a4cc2140854f318006d36119bd8be59dae
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 6 08:57:08 2024 -0400

    Javadoc
---
 src/main/java/org/apache/commons/io/IOUtils.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/commons/io/IOUtils.java b/src/main/java/org/apache/commons/io/IOUtils.java
index cd37b674d..230fa60ae 100644
--- a/src/main/java/org/apache/commons/io/IOUtils.java
+++ b/src/main/java/org/apache/commons/io/IOUtils.java
@@ -1746,7 +1746,7 @@ public class IOUtils {
      * Returns the length of the given array in a null-safe manner.
      *
      * @param array an array or null
-     * @return the array length -- or 0 if the given array is null.
+     * @return the array length, or 0 if the given array is null.
      * @since 2.7
      */
     public static int length(final byte[] array) {
@@ -1757,7 +1757,7 @@ public class IOUtils {
      * Returns the length of the given array in a null-safe manner.
      *
      * @param array an array or null
-     * @return the array length -- or 0 if the given array is null.
+     * @return the array length, or 0 if the given array is null.
      * @since 2.7
      */
     public static int length(final char[] array) {
@@ -1768,7 +1768,7 @@ public class IOUtils {
      * Returns the length of the given CharSequence in a null-safe manner.
      *
      * @param csq a CharSequence or null
-     * @return the CharSequence length -- or 0 if the given CharSequence is null.
+     * @return the CharSequence length, or 0 if the given CharSequence is null.
      * @since 2.7
      */
     public static int length(final CharSequence csq) {
@@ -1779,7 +1779,7 @@ public class IOUtils {
      * Returns the length of the given array in a null-safe manner.
      *
      * @param array an array or null
-     * @return the array length -- or 0 if the given array is null.
+     * @return the array length, or 0 if the given array is null.
      * @since 2.7
      */
     public static int length(final Object[] array) {


(commons-io) 02/10: Avoid NullPointerException in ProxyInputStream.mark(int) when the underlying input stream is null

Posted by gg...@apache.org.
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 4a7bc11e0c6f576cbee1746c3a44ead59bb7695c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 6 08:50:43 2024 -0400

    Avoid NullPointerException in ProxyInputStream.mark(int) when the
    underlying input stream is null
---
 src/changes/changes.xml                                     |  1 +
 .../java/org/apache/commons/io/input/ProxyInputStream.java  |  4 +++-
 .../org/apache/commons/io/input/ProxyInputStreamTest.java   | 13 +++++++++++++
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 91ca00a73..1fb4418cd 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -66,6 +66,7 @@ The <action> type attribute can be add,update,fix,remove.
       <action dev="ggregory" type="fix"                due-to="Gary Gregory">AutoCloseInputStream(InputStream) uses ClosedInputStream.INSTANCE when its input is null.</action>
       <action dev="ggregory" type="fix"                due-to="Gary Gregory">Avoid NullPointerException in ProxyInputStream.available() when the underlying input stream is null.</action>
       <action dev="ggregory" type="fix"                due-to="Gary Gregory">Avoid NullPointerException in ProxyInputStream.markSupported() when the underlying input stream is null.</action>
+      <action dev="ggregory" type="fix"                due-to="Gary Gregory">Avoid NullPointerException in ProxyInputStream.mark(int) when the underlying input stream is null.</action>
       <action dev="ggregory" type="fix"                due-to="Gary Gregory">BufferedFileChannelInputStream.available() returns 0 before any reads.</action>
       <action dev="ggregory" type="fix"                due-to="Gary Gregory">BufferedFileChannelInputStream.available() should return 0 when the stream is closed instead of throwing an exception.</action>      
       <action dev="ggregory" type="fix"                due-to="Gary Gregory">CharSequenceInputStream.available() should return 0 after the stream is closed.</action>
diff --git a/src/main/java/org/apache/commons/io/input/ProxyInputStream.java b/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
index 664d4696a..6341f3815 100644
--- a/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
@@ -186,7 +186,9 @@ public abstract class ProxyInputStream extends FilterInputStream {
      */
     @Override
     public synchronized void mark(final int readLimit) {
-        in.mark(readLimit);
+        if (in != null) {
+            in.mark(readLimit);
+        }
     }
 
     /**
diff --git a/src/test/java/org/apache/commons/io/input/ProxyInputStreamTest.java b/src/test/java/org/apache/commons/io/input/ProxyInputStreamTest.java
index 5dd5075c6..b6d44fdff 100644
--- a/src/test/java/org/apache/commons/io/input/ProxyInputStreamTest.java
+++ b/src/test/java/org/apache/commons/io/input/ProxyInputStreamTest.java
@@ -134,6 +134,19 @@ public class ProxyInputStreamTest<T extends ProxyInputStream> {
         // empty
     }
 
+    //@Test
+    public void testMarkOnNull() throws IOException {
+        try (T inputStream = createFixture(null)) {
+            inputStream.mark(1);
+            inputStream.setIn(createFixture());
+            inputStream.mark(1);
+            IOUtils.toByteArray(inputStream);
+            inputStream.mark(1);
+            inputStream.setIn(null);
+            inputStream.mark(1);
+        }
+    }
+
     @Test
     public void testMarkSupported() throws IOException {
         try (T inputStream = createFixture()) {


(commons-io) 07/10: Javadoc

Posted by gg...@apache.org.
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 a1ef0989fc04d05e02af5c96e5c1c9e37965958f
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 6 09:00:33 2024 -0400

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

diff --git a/src/main/java/org/apache/commons/io/IOUtils.java b/src/main/java/org/apache/commons/io/IOUtils.java
index 230fa60ae..7f938a405 100644
--- a/src/main/java/org/apache/commons/io/IOUtils.java
+++ b/src/main/java/org/apache/commons/io/IOUtils.java
@@ -130,7 +130,7 @@ public class IOUtils {
     // or return one of them.
 
     /**
-     * CR char.
+     * CR char '{@value}'.
      *
      * @since 2.9.0
      */
@@ -147,12 +147,12 @@ public class IOUtils {
     public static final char DIR_SEPARATOR = File.separatorChar;
 
     /**
-     * The UNIX directory separator character.
+     * The UNIX directory separator character '{@value}'.
      */
     public static final char DIR_SEPARATOR_UNIX = '/';
 
     /**
-     * The Windows directory separator character.
+     * The Windows directory separator character '{@value}'.
      */
     public static final char DIR_SEPARATOR_WINDOWS = '\\';
 
@@ -164,13 +164,13 @@ public class IOUtils {
     public static final byte[] EMPTY_BYTE_ARRAY = {};
 
     /**
-     * Represents the end-of-file (or stream).
+     * Represents the end-of-file (or stream) value {@value}.
      * @since 2.5 (made public)
      */
     public static final int EOF = -1;
 
     /**
-     * LF char.
+     * LF char '{@value}'.
      *
      * @since 2.9.0
      */


(commons-io) 03/10: Javadoc markSupported()

Posted by gg...@apache.org.
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 cb0ccf943b3493cf8c7e5f071e302c64cd87d6e6
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 6 08:51:20 2024 -0400

    Javadoc markSupported()
---
 src/main/java/org/apache/commons/io/input/ProxyInputStream.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/io/input/ProxyInputStream.java b/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
index 6341f3815..a0b6241b8 100644
--- a/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/ProxyInputStream.java
@@ -194,7 +194,9 @@ public abstract class ProxyInputStream extends FilterInputStream {
     /**
      * Invokes the delegate's {@link InputStream#markSupported()} method.
      *
-     * @return true if mark is supported, otherwise false
+     * @return {@code true} if this stream instance supports the mark and reset methods; {@code false} otherwise.
+     * @see #mark(int)
+     * @see #reset()
      */
     @Override
     public boolean markSupported() {