You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Benedikt Ritter (JIRA)" <ji...@apache.org> on 2013/02/12 21:21:12 UTC

[jira] [Updated] (SANDBOX-441) [BeanUtils2] Handling of types that can not be instantiated in DefaultClassAccessor should be improved to give users better feedback

     [ 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<T>.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