[ 
https://issues.apache.org/jira/browse/SANDBOX-397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benedikt Ritter updated SANDBOX-397:
------------------------------------

    Attachment: SANDBOX-397.txt

I have created a patch for this issue. Because there was a good amount of 
identical code, I wrapped the retrieval of {{PropertyDescriptors}} into private 
methods. 
I also added some notNull checks where ever property names a passed in. Test 
cases have been modified as well.
                
> [BeanUtils2] Replace NullPointerExceptions been thrown in DefaultBeanAccessor 
> with NoSuchMethodEceptions
> --------------------------------------------------------------------------------------------------------
>
>                 Key: SANDBOX-397
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-397
>             Project: Commons Sandbox
>          Issue Type: Task
>          Components: BeanUtils2
>    Affects Versions: Nightly Builds
>            Reporter: Benedikt Ritter
>         Attachments: SANDBOX-397.txt
>
>
> At the moment, methods in {{DefaultBeanAccessor}} throw a 
> {{NullPointerException}}, if no {{PropertyDescriptor}} for a given property 
> name can be retrieved. As discussed on the ML (see 
> http://markmail.org/thread/zlehclmybp5xgn5n) this behavior should be changed 
> to throwing {{NoSuchMethodException}}.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to