[ http://issues.apache.org/jira/browse/BEANUTILS-154?page=all ]
     
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".

http://java.sun.com/products/javabeans/

> [beanutils] BeanUtils copyProperties does not copy if theres a digit in 
> property name
> -------------------------------------------------------------------------------------
>
>          Key: BEANUTILS-154
>          URL: http://issues.apache.org/jira/browse/BEANUTILS-154
>      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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to