commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36870] - [beanutils] BeanUtilsBean.setProperty incorrectly parses the property name
Date Fri, 07 Oct 2005 22:58:56 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36870>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36870


kunapulir@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |




------- Additional Comments From kunapulir@yahoo.com  2005-10-08 00:58 -------
In our application, the names are dynamically obtained
and contain parantheses.

This can be fixed by looking for the last index of ')' 
instead of first occurrence.

On the other hand PropertyUtilsBean parses the mapped properties
correctly.

It is not clear to me why the two classes - PropertyUtilsBean &
BeanUtilsBean - yield different results for mapped & indexed properties.


BeanUtilsBeanTest
=================

public void testSetMappedProperty() throws Exception
{
        final String    key1    = "weight(kilos)";
        final String    value1  = "10";

        BeanUtils.setProperty(formBean, 
            "assctd(" + key1 + ")", value1);

        assertEquals(value1, BeanUtils.getProperty(formBean, 
            "assctd(" + key1 + ")"));
}

PropertyUtilsBeanTest
=====================

public void testSetMappedProperty() throws Exception
{
        final String    key1    = "weight(kilos)";
        final String    value1  = "10";

        PropertyUtils.setMappedProperty(formBean, 
            "assctd(" + key1 + ")", value1);

        assertEquals(value1, PropertyUtils.getMappedProperty(formBean, 
            "assctd(" + key1 + ")"));
}

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message