commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bart De Gruyter <...@pobox.com>
Subject [beanutils] case sensitivity & digester (proposal)
Date Wed, 10 Jul 2002 09:53:14 GMT
Hi,

When using digester to "digest" the following
XML into a Java object you will get problems:

<pushtransport AckHost="131.176.20.102">

into:

public class PushTransport {
...

     public void setAckHost(java.lang.String aAckHost) {
...
     }


     public String getSendAck() {
...
     }
...



Because the common-beanutils package uses introspection
to get to know the property name of AckHost it will
be transformed into ackHost; hence the digester
rule for "AckHost" will never match a property of
class PushTransport.

Therefore I propose a change in common-beanutils:

in the following file:

/home/cvspublic/jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/PropertyUtils.java,v1.27

2002/07/07 23:17:59

diff:

852c852
<                 if (name.equals(descriptors[i].getName()))
---
 >                 if 
(Introspector.decapitalize(name).equals(descriptors[i].getName()))



I do not have cvs commit access; and would like to know if the
project team would agree that this is a useful bugfix or if
I am using the digester in a wrong way.


friendly greetings,

Bart De Gruyter


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


Mime
View raw message