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 ED895200B13 for ; Tue, 31 May 2016 09:16:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EABC1160A09; Tue, 31 May 2016 07:16:52 +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 3F57A160A23 for ; Tue, 31 May 2016 09:16:52 +0200 (CEST) Received: (qmail 11090 invoked by uid 500); 31 May 2016 07:16:51 -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 11048 invoked by uid 99); 31 May 2016 07:16:51 -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; Tue, 31 May 2016 07:16:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3D3DCE38BC; Tue, 31 May 2016 07:16:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Tue, 31 May 2016 07:16:53 -0000 Message-Id: <47ebf79158274c41b3a18329f5598e02@git.apache.org> In-Reply-To: <7aa3fd19b06c429aae65caba0e82868c@git.apache.org> References: <7aa3fd19b06c429aae65caba0e82868c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/4] camel git commit: Fixed potential NPE archived-at: Tue, 31 May 2016 07:16:53 -0000 Fixed potential NPE Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d0186a41 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d0186a41 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d0186a41 Branch: refs/heads/camel-2.17.x Commit: d0186a417588abfcd8f1707b2befd62e00dbf715 Parents: 1e179aa Author: Claus Ibsen Authored: Tue May 31 08:07:30 2016 +0200 Committer: Claus Ibsen Committed: Tue May 31 09:16:19 2016 +0200 ---------------------------------------------------------------------- .../apache/camel/component/bean/ConstantBeanHolder.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/d0186a41/camel-core/src/main/java/org/apache/camel/component/bean/ConstantBeanHolder.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/ConstantBeanHolder.java b/camel-core/src/main/java/org/apache/camel/component/bean/ConstantBeanHolder.java index d2cbe1c..1965d2b 100644 --- a/camel-core/src/main/java/org/apache/camel/component/bean/ConstantBeanHolder.java +++ b/camel-core/src/main/java/org/apache/camel/component/bean/ConstantBeanHolder.java @@ -40,11 +40,17 @@ public class ConstantBeanHolder implements BeanHolder { } public ConstantBeanHolder(Object bean, CamelContext context) { - this(bean, new BeanInfo(context, bean.getClass())); + ObjectHelper.notNull(bean, "bean"); + + this.bean = bean; + this.beanInfo = new BeanInfo(context, bean.getClass()); } public ConstantBeanHolder(Object bean, CamelContext context, ParameterMappingStrategy parameterMappingStrategy) { - this(bean, new BeanInfo(context, bean.getClass(), parameterMappingStrategy)); + ObjectHelper.notNull(bean, "bean"); + + this.bean = bean; + this.beanInfo = new BeanInfo(context, bean.getClass(), parameterMappingStrategy); } @Override