Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4F15E200CA9 for ; Thu, 1 Jun 2017 09:13:18 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4DDB2160BC4; Thu, 1 Jun 2017 07:13:18 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 45110160BE8 for ; Thu, 1 Jun 2017 09:13:17 +0200 (CEST) Received: (qmail 71567 invoked by uid 500); 1 Jun 2017 07:13:16 -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 71072 invoked by uid 99); 1 Jun 2017 07:13:16 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jun 2017 07:13:16 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E681CE9631; Thu, 1 Jun 2017 07:13:15 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Thu, 01 Jun 2017 07:13:22 -0000 Message-Id: <87cede045c15453199496269bbef6499@git.apache.org> In-Reply-To: <835a098af6614bcfbedbab3ee671497a@git.apache.org> References: <835a098af6614bcfbedbab3ee671497a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [08/10] camel git commit: Update CMISSessionFacade.java archived-at: Thu, 01 Jun 2017 07:13:18 -0000 Update CMISSessionFacade.java Fixing possible null-pointer of document variable. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8c6ae74f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8c6ae74f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8c6ae74f Branch: refs/heads/camel-2.18.x Commit: 8c6ae74fdcc7d411e60a5e4d4d586ce18ded827d Parents: 94d4881 Author: Tomáš Burian Authored: Wed May 31 17:03:22 2017 +0200 Committer: Claus Ibsen Committed: Thu Jun 1 09:12:25 2017 +0200 ---------------------------------------------------------------------- .../org/apache/camel/component/cmis/CMISSessionFacade.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/8c6ae74f/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java ---------------------------------------------------------------------- diff --git a/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java b/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java index d143d7c..0af07d2 100644 --- a/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java +++ b/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java @@ -182,9 +182,11 @@ public class CMISSessionFacade { public InputStream getContentStreamFor(QueryResult item) { Document document = getDocument(item); - ContentStream contentStream = document.getContentStream(); - if (document != null && contentStream != null) { - return contentStream.getStream(); + if(document != null) { + ContentStream contentStream = document.getContentStream(); + if (contentStream != null) { + return contentStream.getStream(); + } } return null; }