Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 84429 invoked from network); 5 Mar 2008 13:46:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Mar 2008 13:46:57 -0000 Received: (qmail 81752 invoked by uid 500); 5 Mar 2008 13:46:51 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 81633 invoked by uid 500); 5 Mar 2008 13:46:50 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 81624 invoked by uid 99); 5 Mar 2008 13:46:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Mar 2008 05:46:50 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Mar 2008 13:46:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id DE7A7234C08F for ; Wed, 5 Mar 2008 05:45:40 -0800 (PST) Message-ID: <804921877.1204724740910.JavaMail.jira@brutus> Date: Wed, 5 Mar 2008 05:45:40 -0800 (PST) From: "Xavier Poinsard (JIRA)" To: issues@commons.apache.org Subject: [jira] Issue Comment Edited: (BEANUTILS-309) Passing a null argument to ConstructorUtils.invokeConstructor causes NullPointerException In-Reply-To: <1087478013.1204717302775.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/BEANUTILS-309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12575340#action_12575340 ] xpoinsard@openpricer.com edited comment on BEANUTILS-309 at 3/5/08 5:44 AM: ------------------------------------------------------------------- What I am trying is more something like that : public class TestConstructor { public TestConstructor(String param1, Integer param2) { } public TestConstructor(Integer param) { } public static void main(String[] args) { new TestConstructor("first",null).toString(); } } which is accepted. was (Author: xpoinsard@openpricer.com): What I am trying is more something like that : public class TestConstructor { public TestConstructor(String param1, Integer param2) { } public TestConstructor(Integer param) { } public static void main(String[] args) { new TestConstructor("first",null).toString(); } } which is accepted. > Passing a null argument to ConstructorUtils.invokeConstructor causes NullPointerException > ----------------------------------------------------------------------------------------- > > Key: BEANUTILS-309 > URL: https://issues.apache.org/jira/browse/BEANUTILS-309 > Project: Commons BeanUtils > Issue Type: Bug > Affects Versions: 1.7.0, 1.8.0-BETA > Reporter: Xavier Poinsard > > I am invoking ConstructorUtils.invokeConstructor with an array of arguments and one of these arguments is null. > This causes a NullPointerException line 120 in Class ConstructorUtils. > Since its not forbidden to pass null argument to a constructor, ConstructorUtils should handle it. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.