commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedikt Ritter (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SANDBOX-441) [BeanUtils2] Handling of InstantiationException in DefaultClassAccessor.newInstance() should be improved to give users better feedback
Date Sun, 10 Feb 2013 21:03:12 GMT
Benedikt Ritter created SANDBOX-441:
---------------------------------------

             Summary: [BeanUtils2] Handling of InstantiationException in DefaultClassAccessor.newInstance()
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
            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

Mime
View raw message