commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin van den Bemt <mll...@mvdb.net>
Subject Re: [beanutils] case sensitivity & digester (proposal)
Date Wed, 10 Jul 2002 09:57:42 GMT
Betwixt provides this functionality already (and allows you to use any
kind of element name format / attribute name format you want
(ElementNameMapper and AttributeNameMapper). 
Maybe it is usefull to check it out if it suits your need..
(btw betwixt uses beanutils..)

Mvgr,
Martin

On Wed, 2002-07-10 at 11:53, Bart De Gruyter wrote:
> 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>
> 
> 



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