ppkarwasz commented on code in PR #776:
URL: https://github.com/apache/commons-io/pull/776#discussion_r2329705120
##########
src/main/java/org/apache/commons/io/IOUtils.java:
##########
@@ -221,6 +221,21 @@ public class IOUtils {
*/
private static final char[] SCRATCH_CHAR_BUFFER_WO = charArray();
+ /**
+ * The maximum size of an array in many Java VMs.
+ */
+ private static final int MAX_ARRAY_LENGTH = Integer.MAX_VALUE - 8;
+
+ /*
+ * Default maximum chunk size used when copying large streams into a byte
array.
+ * <p>
+ * This value is somewhat arbitrary, currently aligned with the value used
by
+ * <a
href="https://github.com/python/cpython/blob/3.14/Lib/_pyio.py">Python</a>
Review Comment:
Fixed in
https://github.com/apache/commons-io/pull/776/commits/38a6a2c6b7dcb3cf0646a54ce4a762913f6b7627
I didn't use `{@value}`, since as far as I remember, the `javadoc` tool in
JDK 8 fails to reference values, which are not public constants.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]