commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <>
Subject [jira] Resolved: (BEANUTILS-154) [beanutils] BeanUtils copyProperties does not copy if theres a digit in property name
Date Fri, 09 Jun 2006 13:52:31 GMT
     [ ]
Niall Pemberton resolved BEANUTILS-154:

    Resolution: Invalid

BeanUtils works be getting the PropertyDescriptors for a bean and matching the name. According
to the JavaBean specification [1] the property name is determined for the accessor methods
by removing the get/set and changing the first letter to lower case - unless the first two
letters are upper case, and then it leaves it alone.

Since the second letter of your property names are numeric digits it is changing the first
letter to lower case - so the property names are p1NAME and p2NAME and hence BeanUtils can't
find the properties to copy to.

If you use PP1NAME or PNAME1 as property names in your custom bean - or use p1NAME and p2NAME
in your DynaBean  then it would work.

The issue then is with the Java Beans spec and not BeanUtils and I'm closing this as "invalid".

> [beanutils] BeanUtils copyProperties does not copy if theres a digit in property name
> -------------------------------------------------------------------------------------
>          Key: BEANUTILS-154
>          URL:
>      Project: Commons BeanUtils
>         Type: Bug

>     Versions: 1.6 Final
>  Environment: Operating System: other
> Platform: All
>     Reporter: Hans

> If dest has two properties, say P1NAME and P2NAME, with setter methods
> setP1NAME(String ... and setP2NAME(String ... then the properties from orig will
> not be copied from orig to dest.
> In my particular case orig is a DynaActionBean and dest is a custom bean. If
> P1NAME is changed to PNAME, then the copy properties works.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

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

View raw message