You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by re...@apache.org on 2016/05/09 23:38:12 UTC
[05/16] cxf git commit: [CXF-6463] Preventing NPE if InputStream is
null
[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-jaxrs-2.1
Commit: b875cecedb449c764de9c6669dd6d7d80e146f23
Parents: b975984
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Fri May 6 12:42:27 2016 +0100
Committer: Sergey Beryozkin <sb...@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);
}