Repository: cxf Updated Branches: refs/heads/3.0.x-fixes a7c8edeaa -> 6e3b8bad8
[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/6e3b8bad Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/6e3b8bad Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/6e3b8bad Branch: refs/heads/3.0.x-fixes Commit: 6e3b8bad8141e078f8fc1daf7d3bd80bf52f4170 Parents: a7c8ede Author: Sergey Beryozkin <[email protected]> Authored: Fri May 6 12:42:27 2016 +0100 Committer: Sergey Beryozkin <[email protected]> Committed: Fri May 6 12:46:25 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/6e3b8bad/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 9232fe3..dee6f51 100644 --- a/core/src/main/java/org/apache/cxf/helpers/IOUtils.java +++ b/core/src/main/java/org/apache/cxf/helpers/IOUtils.java @@ -141,6 +141,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); }
