You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2021/10/26 19:42:53 UTC

[GitHub] [cxf] reta commented on a change in pull request #867: CXF-8610:Add null check to IOUtils to avoid null CCL

reta commented on a change in pull request #867:
URL: https://github.com/apache/cxf/pull/867#discussion_r736863506



##########
File path: core/src/main/java/org/apache/cxf/helpers/IOUtils.java
##########
@@ -240,6 +244,9 @@ public static int copy(final InputStream input, final OutputStream output,
     public static void copyAtLeast(final InputStream input,
                                final OutputStream output,
                                int atLeast) throws IOException {
+        if (input == null || output == null ) {

Review comment:
       Could you please use `Objects::requireNonNull` from the standard library? For example,
   
   ```
   Objects.requireNonNull(input, "The inputStream is required but null value was provided");
   Objects.requireNonNull(outputStream, "The outputStream is required but null value was provided");
   ```
   
   Thank you.




-- 
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: dev-unsubscribe@cxf.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org