Repository: camel Updated Branches: refs/heads/camel-2.16.x 5e99f0afa -> e9c5ae2b8
[CAMEL-9993]add NPE guard for camel-cxf RawMessageContentRedirectInterceptor (cherry picked from commit a666da600991ecd6921ebfc41b8dd460943fab04) (cherry picked from commit 3f9c21f8dd2ea0de51c82c2373fe6d31d9c18c22) Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e9c5ae2b Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e9c5ae2b Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e9c5ae2b Branch: refs/heads/camel-2.16.x Commit: e9c5ae2b8c89dfc92b227fcf7929814f762c9010 Parents: 5e99f0af Author: Freeman Fang <freeman.f...@gmail.com> Authored: Thu May 26 10:58:13 2016 +0800 Committer: Freeman Fang <freeman.f...@gmail.com> Committed: Thu May 26 11:06:49 2016 +0800 ---------------------------------------------------------------------- .../cxf/interceptors/RawMessageContentRedirectInterceptor.java | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/e9c5ae2b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/interceptors/RawMessageContentRedirectInterceptor.java ---------------------------------------------------------------------- diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/interceptors/RawMessageContentRedirectInterceptor.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/interceptors/RawMessageContentRedirectInterceptor.java index 4f283c9..86a6dc4 100644 --- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/interceptors/RawMessageContentRedirectInterceptor.java +++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/interceptors/RawMessageContentRedirectInterceptor.java @@ -49,6 +49,11 @@ public class RawMessageContentRedirectInterceptor extends AbstractPhaseIntercept if (null != params) { InputStream is = (InputStream)params.get(0); OutputStream os = message.getContent(OutputStream.class); + if (os == null) { + //InOny + return; + } + try { if (is instanceof StreamCache) { ((StreamCache)is).writeTo(os);