Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0DC45EC03 for ; Tue, 12 Feb 2013 20:21:16 +0000 (UTC) Received: (qmail 52378 invoked by uid 500); 12 Feb 2013 20:21:13 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 52227 invoked by uid 500); 12 Feb 2013 20:21:13 -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 51888 invoked by uid 99); 12 Feb 2013 20:21:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2013 20:21:13 +0000 Date: Tue, 12 Feb 2013 20:21:12 +0000 (UTC) From: "Benedikt Ritter (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (SANDBOX-441) [BeanUtils2] Handling of types that can not be instantiated in DefaultClassAccessor should be improved to give users better feedback MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SANDBOX-441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benedikt Ritter updated SANDBOX-441: ------------------------------------ Summary: [BeanUtils2] Handling of types that can not be instantiated in DefaultClassAccessor should be improved to give users better feedback (was: [BeanUtils2] Handling of InstantiationException in DefaultClassAccessor.newInstance() should be improved to give users better feedback) Changing the issue's title as it does not only apply to the newInstance() method. > [BeanUtils2] Handling of types that can not be instantiated in DefaultClassAccessor should be improved to give users better feedback > ------------------------------------------------------------------------------------------------------------------------------------ > > Key: SANDBOX-441 > URL: https://issues.apache.org/jira/browse/SANDBOX-441 > Project: Commons Sandbox > Issue Type: Improvement > Components: BeanUtils2 > Affects Versions: Nightly Builds > Reporter: Benedikt Ritter > Assignee: Benedikt Ritter > Priority: Minor > Fix For: Nightly Builds > > > The handling of InstantiationException could be improved to give users a better feedback of what went wrong (see JavaDoc of Class.newInstance() for reasons why instantiation may fail): > * check if a default constructor is available and throw NoSuchConstructorException if not > * else throw BeanInstantiationException but inspect beanType in BeanInstantiationException and set specific messages for the following cases: > ** BeanType is abstract > ** BeanType is an interface > ** BeanType is a primitive type > ** BeanType is an array type > ** BeanType represents void > ** if none of the above use a generic message -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira