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


##########
src/main/java/org/apache/commons/io/input/BrokenReader.java:
##########
@@ -114,6 +115,10 @@ public void mark(final int readAheadLimit) throws 
IOException {
      */
     @Override
     public int read(final char[] cbuf, final int off, final int len) throws 
IOException {
+        IOUtils.checkFromIndexSize(cbuf, off, len);

Review Comment:
   Thinking more about it, the `read(char[])` and `read(CharBuffer)` overrides 
are excessive and I removed them in 
https://github.com/apache/commons-io/pull/790/commits/bbde62705159668acddaaab29163346e06d05119.
 Since almost no class overrides those, users should expect an NPE if the 
argument is `null`.



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