[
https://issues.apache.org/jira/browse/SANDBOX-423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benedikt Ritter updated SANDBOX-423:
------------------------------------
Attachment: SANDBOX-423v2.patch
I finally had the time to do some more work on this issue.
I have attached a new patch file.
We discussed to throw exceptions as soon as possible to get rid of all the
try/catch code in {{DefaultBeanAccessor}}. I started to implement that, but
things got way out of hand, so I decided to go back to the first solution to
make it easier to review.
We can change the exception handling later.
One thing I don't like about my solution is, that an {{IntrospectionException}}
will be wrapped in a {{NoSuchPropertyException}}, but this is due to the
Introspection API.
Also constructing a Property[Setter|Getter]InvocationException feels clumsy
because one has to pass in both, the property name and the property accessor
method name. Maybe you have a suggestion how to improve that?
TIA
Benedikt
> [BeanUtils2] Wrap checked exceptions from BeanAccessor.get() into
> BeanReflectionException
> -----------------------------------------------------------------------------------------
>
> Key: SANDBOX-423
> URL: https://issues.apache.org/jira/browse/SANDBOX-423
> Project: Commons Sandbox
> Issue Type: Sub-task
> Components: BeanUtils2
> Affects Versions: Nightly Builds
> Reporter: Benedikt Ritter
> Fix For: Nightly Builds
>
> Attachments: SANDBOX-423.patch, SANDBOX-423v2.patch
>
>
> * Change method signature of BeanAccessor.get()
> * in DefaultBeanAccessor.get() catch all checked exceptions
> * modify GetPropertyTestCase accordingly
--
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