From ed20f2aa57a8494782e362decb48a3561936c194 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Sun, 10 Nov 2024 08:07:48 -0500 Subject: [PATCH 1/2] [IO-856] Try test on all OSs for GitHub CI --- src/test/java/org/apache/commons/io/FileUtilsListFilesTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/apache/commons/io/FileUtilsListFilesTest.java b/src/test/java/org/apache/commons/io/FileUtilsListFilesTest.java index 20e3c8d77a1..6def0148670 100644 --- a/src/test/java/org/apache/commons/io/FileUtilsListFilesTest.java +++ b/src/test/java/org/apache/commons/io/FileUtilsListFilesTest.java @@ -238,7 +238,7 @@ public void testListFilesWithDeletion() throws IOException { * Tests IO-856 ListFiles should not fail on vanishing files. */ @Test - @EnabledOnOs(value = OS.WINDOWS) + // @EnabledOnOs(value = OS.WINDOWS) public void testListFilesWithDeletionThreaded() throws ExecutionException, InterruptedException { // test for IO-856 // create random directory in tmp, create the directory if it does not exist From 7f28a8d9c6248c8d0ea63815179a0cc6a9e1776e Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Sat, 11 Apr 2026 08:18:55 -0400 Subject: [PATCH 2/2] Javadoc - Make some package-private constructors private - Provide "default" constructors for simple use cases --- .../ByteArraySeekableByteChannel.java | 12 ++-- .../io/channels/CloseShieldChannel.java | 12 ++-- .../channels/CloseShieldChannelHandler.java | 5 +- .../io/channels/FilterByteChannel.java | 19 +++++ .../commons/io/channels/FilterChannel.java | 19 +++++ .../io/channels/FilterFileChannel.java | 69 ++++++++++++++++++- .../channels/FilterReadableByteChannel.java | 19 +++++ .../channels/FilterSeekableByteChannel.java | 19 +++++ .../channels/FilterWritableByteChannel.java | 19 +++++ ...oseShieldChannelFilterByteChannelTest.java | 2 +- .../io/channels/FilterFileChannelTest.java | 7 +- .../FilterReadableByteChannelTest.java | 2 +- .../FilterSeekableByteChannelTest.java | 2 +- .../FilterWritableByteChannelTest.java | 2 +- 14 files changed, 191 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/apache/commons/io/channels/ByteArraySeekableByteChannel.java b/src/main/java/org/apache/commons/io/channels/ByteArraySeekableByteChannel.java index 3edfd3c0978..57c38124875 100644 --- a/src/main/java/org/apache/commons/io/channels/ByteArraySeekableByteChannel.java +++ b/src/main/java/org/apache/commons/io/channels/ByteArraySeekableByteChannel.java @@ -104,12 +104,14 @@ public static Builder builder() { /** * Constructs a new channel backed directly by the given byte array. * - *

The channel initially contains the full contents of the array, with its - * size set to {@code bytes.length} and its position set to {@code 0}.

+ *

+ * The channel initially contains the full contents of the array, with its size set to {@code bytes.length} and its position set to {@code 0}. + *

* - *

Reads and writes operate on the shared array. - * If a write operation extends beyond the current capacity, the channel will - * automatically allocate a larger backing array and copy the existing contents.

+ *

+ * Reads and writes operate on the shared array. If a write operation extends beyond the current capacity, the channel will automatically allocate a larger + * backing array and copy the existing contents. + *

* * @param bytes The byte array to wrap, must not be {@code null} * @return A new channel that uses the given array as its initial backing store. diff --git a/src/main/java/org/apache/commons/io/channels/CloseShieldChannel.java b/src/main/java/org/apache/commons/io/channels/CloseShieldChannel.java index ba890d8a6a7..987e8427c7c 100644 --- a/src/main/java/org/apache/commons/io/channels/CloseShieldChannel.java +++ b/src/main/java/org/apache/commons/io/channels/CloseShieldChannel.java @@ -36,11 +36,13 @@ /** * Creates a close-shielding proxy for a {@link Channel}. * - *

The returned proxy implements all {@link Channel} sub-interfaces that are both supported by this implementation and actually implemented by the given - * delegate.

- * - *

The following interfaces are supported:

- * + *

+ * The returned proxy implements all {@link Channel} sub-interfaces that are both supported by this implementation and actually implemented by the given + * delegate. + *

+ *

+ * The following interfaces are supported: + *

*