ppkarwasz opened a new pull request, #795:
URL: https://github.com/apache/commons-io/pull/795

   In #790 I introduced `IOUtils#checkIndexFromLength` calls to validate 
arguments across the codebase. Ironically, the `IOUtils` class itself was left 
out.
   
   This PR addresses that omission by adding argument validation to 
`IOUtils#read` and `IOUtils#readFully`.
   
   Key points:
   
   * Ensures consistency with the rest of Commons IO by validating `offset` and 
`length`.
   * Fixes inconsistent exception behavior:
   
     * Previously, `length < 0` resulted in an `IllegalArgumentException`.
     * `offset < 0` did not trigger validation and failed later with an 
`IndexOutOfBoundsException`.
   * With this change, both invalid cases are handled consistently and upfront.
   


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