[ 
https://issues.apache.org/jira/browse/BEANUTILS-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alexander Koppelhuber updated BEANUTILS-307:
--------------------------------------------

    Description: 
settings values for a property that has one lower case character at the 
beginning
followed by an upper case character does not work. for example "xValue" or 
"zIndex".
The reason (as far as I found out) is as follows:
Introspector.getBeanInfo() gets the property names from the get/set methods.
In Introspector.getTargetPropertyInfo() the following code creates a 
PropertyDescriptor:
>pd = new PropertyDescriptor(decapitalize(name.substring(3)),......)

decapitalize(....) says "....when there is more than one character and both the 
first and
     * second characters are upper case, we leave it alone..."
which results in the name = "XValue" for the method getXValue()

so setProperty(...) does not find a descriptor for "xValue" and cannot call the 
setXValue method

  was:
settings values for a property that has one lower case character at the 
beginning
followed by an upper case character does not work. for example "xValue" or 
"zIndex".
The reason (as far as I found out) is as follows:
Introspector.getBeanInfo() gets the property names from the get/set methods.
In Introspector.getTargetPropertyInfo() the following code creates a 
PropertyDescriptor:


> BeanUtils.setProperty(...) not working for property "xValue"
> ------------------------------------------------------------
>
>                 Key: BEANUTILS-307
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-307
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: Bean / Property Utils
>         Environment: linux, jdk 1.6, beanutils 1.8 beta
>            Reporter: Alexander Koppelhuber
>
> settings values for a property that has one lower case character at the 
> beginning
> followed by an upper case character does not work. for example "xValue" or 
> "zIndex".
> The reason (as far as I found out) is as follows:
> Introspector.getBeanInfo() gets the property names from the get/set methods.
> In Introspector.getTargetPropertyInfo() the following code creates a 
> PropertyDescriptor:
> >pd = new PropertyDescriptor(decapitalize(name.substring(3)),......)
> decapitalize(....) says "....when there is more than one character and both 
> the first and
>      * second characters are upper case, we leave it alone..."
> which results in the name = "XValue" for the method getXValue()
> so setProperty(...) does not find a descriptor for "xValue" and cannot call 
> the setXValue method

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

Reply via email to