garydgregory commented on a change in pull request #299:
URL: https://github.com/apache/commons-io/pull/299#discussion_r745799536



##########
File path: src/main/java/org/apache/commons/io/IOUtils.java
##########
@@ -280,6 +280,8 @@ public static BufferedOutputStream buffer(final 
OutputStream outputStream, final
      * @since 2.5
      */
     public static BufferedReader buffer(final Reader reader) {
+        // reject null early on rather than waiting for IO operation to fail
+        Objects.requireNonNull(reader, "reader");

Review comment:
       This comment is wrong and the check is not needed: The BufferedReader 
constructor code path already checks for null input and throws an NPE.




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