commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <>
Subject [jira] Commented: (BEANUTILS-92) PropertyUtilsBean.copyProperties does not catch NoSuchMethodException
Date Tue, 17 Jul 2007 17:53:04 GMT


Henri Yandell commented on BEANUTILS-92:

Unit test comments:

* You don't need to catch the Throwable, just let the exception hit the JUnit framework.
* Do we really need the main methods?
* Do we really need the suite methods?
* Do we need the overridden setup/teardown methods?
* Do we need the constructor? [JUnit stopped needing this a long time back from memory]

*grumbles as always about <p /> instead of <br/>*

Fix comments:

* It would be nice if the debug was more expressive - ie) "Error writing to 'name' on class

Otherwise, +1.

> PropertyUtilsBean.copyProperties does not catch NoSuchMethodException
> ---------------------------------------------------------------------
>                 Key: BEANUTILS-92
>                 URL:
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: Bean / Property Utils
>    Affects Versions: 1.7.0
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Will Pugh
>            Assignee: Niall Pemberton
>             Fix For: 1.8.0
>         Attachments: Beanutils-92-updated.patch, fixCopyPropertyException,
> I ran into a problem where I had a bean that had an IndexedSetter but no simple
> setter.  This caused a NoSuchMethodException to get thrown in
> PropertyUtilsBean.copyProperties.  This is inconsistant with BeanUtilsBean which
> catches this case and continues copying the other properties.
> When I asked about this in on the mailing list, the answer seemed to come back
> that this is probabaly incorrect behaviour, but it is possible people depend on
> this behaviour so this might be too big a change for a point release.  I'm
> attaching the patch so it can be added to the next major release (if it is
> determined to be incorrect behaviour).
> The scenario I ran into this was one where I had a bean that I then used CGLib
> for enhancing.  After that, the bean failed to be clonable by BeanUtils.clone.
> This could potentially become a big deal since Hibernate used CGLib for adding
> proxies to beans for lazy loading.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message