commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Arnold <geoff...@geoffreyarnold.com>
Subject Re: [Jelly] Tag attributes corresponding to arrays
Date Tue, 11 May 2004 20:52:45 GMT
robert burrell donkin wrote:

> the bigger concern was switching all the conversions from one 
> beanutils system of conversions to another. there's a possibility of 
> nasty side effects which (since jelly's not particularly well tested) 
> may well bit people. it's hard to say how likely this would be in 
> practice, though.


Doesn't this assume that the current behavior is "correct"?

IMHO the current behavior is a bug.  Given an object with a setter 
method that accepts a String[] argument, I would expect that I could 
register a Converter for the String[] type to control how the XML 
attribute is parsed into an array (the entire preface for 
ConvertUtils).  However, the use of the BeanUtils.populate() and 
BeanUtils.setProperty() methods circumvents this ability.  Furthermore, 
the BeanUtils documentation plainly states that populate() and 
setProperty() do not perform type conversions properly and are really 
only useful in the context of Struts.

Therefore I do not believe that maintaining backwards compatibility 
should be considered a priority as the current implementation is 
broken.  And although I do not have any data to back this up, I believe 
that it would be a _very_ rare case for users to parse the 
single-element array in their setter functions to perform the proper 
conversion.

Geoff.


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


Mime
View raw message