Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2FBC9D68E for ; Tue, 18 Dec 2012 21:12:43 +0000 (UTC) Received: (qmail 1706 invoked by uid 500); 18 Dec 2012 21:12:43 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 1655 invoked by uid 500); 18 Dec 2012 21:12:43 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 1645 invoked by uid 99); 18 Dec 2012 21:12:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2012 21:12:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2012 21:12:40 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C3ECF2388B6C; Tue, 18 Dec 2012 21:12:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1423650 - /camel/branches/camel-2.10.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CxfPayloadConverter.java Date: Tue, 18 Dec 2012 21:12:19 -0000 To: commits@camel.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121218211219.C3ECF2388B6C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Tue Dec 18 21:12:18 2012 New Revision: 1423650 URL: http://svn.apache.org/viewvc?rev=1423650&view=rev Log: Merged revisions 1423644 via git cherry-pick from https://svn.apache.org/repos/asf/camel/trunk ........ r1423644 | dkulp | 2012-12-18 15:57:59 -0500 (Tue, 18 Dec 2012) | 2 lines [CAMEL-5897] FIx a potential NPE ........ Modified: camel/branches/camel-2.10.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CxfPayloadConverter.java Modified: camel/branches/camel-2.10.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CxfPayloadConverter.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CxfPayloadConverter.java?rev=1423650&r1=1423649&r2=1423650&view=diff ============================================================================== --- camel/branches/camel-2.10.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CxfPayloadConverter.java (original) +++ camel/branches/camel-2.10.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CxfPayloadConverter.java Tue Dec 18 21:12:18 2012 @@ -147,7 +147,8 @@ public final class CxfPayloadConverter { if (CxfPayload.class.isAssignableFrom(value.getClass())) { CxfPayload payload = (CxfPayload) value; - if (payload.getBodySources().size() == 1) { + if (payload.getBodySources() != null + && payload.getBodySources().size() == 1) { if (type.isAssignableFrom(Document.class)) { Source s = payload.getBodySources().get(0); Document d;