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] making BeanUtils.setProperty() public
Date Thu, 16 May 2002 19:08:05 GMT


On Thu, 16 May 2002, James Strachan wrote:

> Date: Thu, 16 May 2002 17:00:19 +0100
> From: James Strachan <james_strachan@yahoo.co.uk>
> Reply-To: Jakarta Commons Developers List <commons-dev@jakarta.apache.org>
> To: Jakarta Commons Developers <commons-dev@jakarta.apache.org>
> Subject: [beanutils] making BeanUtils.setProperty() public
>
> For some reason the very useful BeanUtils.setProperty(bean, property, value)
> method is private. Does anyone have any objections to making it public?
>

It was originally private because I just factored out a bunch of code that
was in two places in BeanUtils.populate().  I guess it is sorta useful on
its own, because it does the automatic conversions for you.  Go for it.

> Creating a Map and filling it with one property/value pair so that
> BeanUtils.populate() can be called seems a tad inefficient if someone only
> wants to set one property, using the same conversion rules as
> BeanUtils.populate().
>
> James

Craig


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