[
https://issues.apache.org/jira/browse/SANDBOX-423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13408874#comment-13408874
]
Simone Tripodi commented on SANDBOX-423:
----------------------------------------
Hi Bene,
{quote}
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.
{quote}
I like the way you are implementing that feature, go ahead in that way!!! :)
{quote}
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.
{quote}
Let's keep it as it is - hopefully a (maybe?) better solution will come up
later...
{quote}
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?
{quote}
I am not sure there's a better/automatic way... take in consideration that via
the {{*BeanInfo}} classes, users can alter accessor methods, so users'
beans/POJOs not necessarily respect the code conventions...
Positive feedback from my side, I think you can go ahead with on getting rid of
checked exceptions on other {{BeanAccessor}} methods, so I will apply the
patch. Well done! :)
> [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