cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6463] Preventing NPE if InputStream is null
Date Fri, 06 May 2016 11:42:43 GMT
Repository: cxf
Updated Branches:
  refs/heads/master b97598447 -> b875ceced


[CXF-6463] Preventing NPE if InputStream is null


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b875cece
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b875cece
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b875cece

Branch: refs/heads/master
Commit: b875cecedb449c764de9c6669dd6d7d80e146f23
Parents: b975984
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri May 6 12:42:27 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri May 6 12:42:27 2016 +0100

----------------------------------------------------------------------
 core/src/main/java/org/apache/cxf/helpers/IOUtils.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/b875cece/core/src/main/java/org/apache/cxf/helpers/IOUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/helpers/IOUtils.java b/core/src/main/java/org/apache/cxf/helpers/IOUtils.java
index b14c96c..5c4d189 100644
--- a/core/src/main/java/org/apache/cxf/helpers/IOUtils.java
+++ b/core/src/main/java/org/apache/cxf/helpers/IOUtils.java
@@ -142,6 +142,9 @@ public final class IOUtils {
 
     public static int copy(final InputStream input, final OutputStream output)
         throws IOException {
+        if (input == null) {
+            return 0;
+        }
         if (output instanceof CopyingOutputStream) {
             return ((CopyingOutputStream)output).copyFrom(input);
         }


Mime
View raw message