commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simone Tripodi (JIRA)" <>
Subject [jira] [Commented] (SANDBOX-423) [BeanUtils2] Wrap checked exceptions from BeanAccessor.get() into BeanReflectionException
Date Sun, 08 Jul 2012 09:00:42 GMT


Simone Tripodi commented on SANDBOX-423:

Hi Bene,

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.

I like the way you are implementing that feature, go ahead in that way!!! :)

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.

Let's keep it as it is - hopefully a (maybe?) better solution will come up later...

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?

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:
>             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:!default.jspa
For more information on JIRA, see:


View raw message