ppkarwasz commented on code in PR #790:
URL: https://github.com/apache/commons-io/pull/790#discussion_r2393868222
##########
src/main/java/org/apache/commons/io/output/ClosedOutputStream.java:
##########
@@ -73,6 +75,7 @@ public void flush() throws IOException {
*/
@Override
public void write(final byte b[], final int off, final int len) throws
IOException {
+ IOUtils.checkFromIndexSize(b, off, len);
Review Comment:
This is similar to
https://github.com/apache/commons-io/pull/790#discussion_r2390105476, with the
difference that I couldn't find `java.io` classes that check for closure,
before validating arguments.
`FileOutputStream`, `OutputStream.nullOutputStream()` and even
`BufferedOutputStream` and `PipedOutputStream` check the arguments **first**.
--
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]