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 ddb6c580c Inline comment
ddb6c580c is described below

commit ddb6c580cc37b703436a13887b3e108dce343877
Author: Gary D. Gregory <garydgreg...@gmail.com>
AuthorDate: Sun Mar 23 08:49:34 2025 -0400

    Inline comment
---
 src/main/java/org/apache/commons/io/channels/FileChannels.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/io/channels/FileChannels.java 
b/src/main/java/org/apache/commons/io/channels/FileChannels.java
index aca2850ba..f4d611493 100644
--- a/src/main/java/org/apache/commons/io/channels/FileChannels.java
+++ b/src/main/java/org/apache/commons/io/channels/FileChannels.java
@@ -64,7 +64,7 @@ public static boolean contentEquals(final ReadableByteChannel 
channel1, final Re
         if (Objects.equals(channel1, channel2)) {
             return true;
         }
-        // Dig in and do the work
+        // Don't use ByteBuffer#compact() to avoid extra copying.
         final ByteBuffer c1Buffer = ByteBuffer.allocateDirect(bufferCapacity);
         final ByteBuffer c2Buffer = ByteBuffer.allocateDirect(bufferCapacity);
         int c1NumRead = 0;

Reply via email to