You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ff...@apache.org on 2016/05/26 02:58:28 UTC

camel git commit: [CAMEL-9993]add NPE guard for camel-cxf RawMessageContentRedirectInterceptor

Repository: camel
Updated Branches:
  refs/heads/master f40d087d4 -> a666da600


[CAMEL-9993]add NPE guard for camel-cxf RawMessageContentRedirectInterceptor


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

Branch: refs/heads/master
Commit: a666da600991ecd6921ebfc41b8dd460943fab04
Parents: f40d087
Author: Freeman Fang <fr...@gmail.com>
Authored: Thu May 26 10:58:13 2016 +0800
Committer: Freeman Fang <fr...@gmail.com>
Committed: Thu May 26 10:58:13 2016 +0800

----------------------------------------------------------------------
 .../cxf/interceptors/RawMessageContentRedirectInterceptor.java  | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a666da60/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);