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 06:03:32 UTC

[GitHub] [cxf] ppanda2021 opened a new pull request #867: CXF-8610:Add null check to IOUtils to avoid null CCL

ppanda2021 opened a new pull request #867:
URL: https://github.com/apache/cxf/pull/867


   Added null check to the part public methods of IOUtils to prevent  null pointer exceptions. 
   Code tested against version CXF 3.3.11
   links:[CXF-8610](https://issues.apache.org/jira/projects/CXF/issues/CXF-8610?filter=allissues)


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



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

Posted by GitBox <gi...@apache.org>.
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



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

Posted by GitBox <gi...@apache.org>.
ppanda2021 commented on a change in pull request #867:
URL: https://github.com/apache/cxf/pull/867#discussion_r737064006



##########
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:
       Thank you for your reply. I'll revise it as soon as possible as you suggest.




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



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

Posted by GitBox <gi...@apache.org>.
ppanda2021 commented on a change in pull request #867:
URL: https://github.com/apache/cxf/pull/867#discussion_r737064006



##########
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:
       Thank you for your reply. I'll revise it as soon as you suggest.




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



[GitHub] [cxf] reta merged pull request #867: CXF-8610:Add null check to IOUtils to avoid null CCL

Posted by GitBox <gi...@apache.org>.
reta merged pull request #867:
URL: https://github.com/apache/cxf/pull/867


   


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



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

Posted by GitBox <gi...@apache.org>.
reta commented on a change in pull request #867:
URL: https://github.com/apache/cxf/pull/867#discussion_r737379630



##########
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:
       👍 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