commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: [beanutils] case sensitivity & digester (proposal)
Date Wed, 10 Jul 2002 15:57:25 GMT
I don't particularly like the idea of making Digester non-case-sensitive.
Everything else about XML *is* case sensitive, and so is JavaBeans
introspection -- it would be very confusing to have this work differently.

Craig


On Wed, 10 Jul 2002, Bart De Gruyter wrote:

> Date: Wed, 10 Jul 2002 11:53:14 +0200
> From: Bart De Gruyter <bdg@pobox.com>
> Reply-To: Jakarta Commons Developers List <commons-dev@jakarta.apache.org>
> To: commons-dev@jakarta.apache.org
> Subject: [beanutils] case sensitivity & digester (proposal)
>
> 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