You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/11/16 22:29:51 UTC

DO NOT REPLY [Bug 37535] New: - beanutils 1.7.1 and properties with different types and the same name

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=37535>.
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=37535

           Summary: beanutils 1.7.1 and properties with different types and
                    the same name
           Product: Commons
           Version: unspecified
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Bean Utilities
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: hps@intermeta.de


Attached you will find a test case for beanutils, where I have the
following problem:

Consider a bean which has three properties, one simple, one indexed
and one mapped. As long as these have three different names, they differ
in the names of their getters and setters (e.g. with an Integer property):

e.g.

Integer getSimpleProperty() / void setSimpleProperty(Integer)
Integer getIndexedProperty(int) / void setIndexedProperty(int, Integer)
Integer getMappedProperty(String) / void setMappedProperty(String, Integer)

Now it is still possible, that a bean has three different properties
(simple, indexed. mapped) with the *same* name:

Integer getProperty() / void setProperty(Integer)
Integer getProperty(int) / void setProperty(int, Integer)
Integer getProperty(String) / void setProperty(String, Integer)

And for this case, BeanUtils does not work (this is an actual bug that
I've found in a program where a simple and an indexed property of the
same name exist). 

Attached are test cases for this. MultiBean is a bean where all three
properties have the same name and MultiPropertyBean has properties
with different names. The TestCases both use the same parent class
(BeanTester), so the behaviour should be similar for both
beans. However, it is not. MultiPropertyBeanTestCase succeeds,
MultiBeanTestCase fails.

-- 
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