ppkarwasz commented on code in PR #790:
URL: https://github.com/apache/commons-io/pull/790#discussion_r2393942743


##########
src/main/java/org/apache/commons/io/output/NullOutputStream.java:
##########
@@ -75,7 +77,7 @@ public void write(final byte[] b) throws IOException {
      */
     @Override
     public void write(final byte[] b, final int off, final int len) {
-        // noop
+        IOUtils.checkFromIndexSize(b, off, len);

Review Comment:
   I fixed the Javadoc in 
https://github.com/apache/commons-io/pull/790/commits/1e558f5e05cb2c67fc3a4f7404a73ddae02c6a81
 and added some tests to assert that arguments are validated.
   
   The proposed behavior aligns with `OutputStream.nullOutputStream()`, except 
`close()` is a no-op in this implementation.



-- 
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]

Reply via email to