Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 93184 invoked from network); 4 Dec 2002 20:19:25 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 4 Dec 2002 20:19:25 -0000 Received: (qmail 316 invoked by uid 97); 4 Dec 2002 20:20:20 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 181 invoked by uid 97); 4 Dec 2002 20:20:19 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 148 invoked by uid 98); 4 Dec 2002 20:20:18 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Date: Wed, 4 Dec 2002 20:19:24 +0000 Subject: Re: [beanutils] BeanUtils.copyProperties support for non-simple properties...? Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v482) From: robert burrell donkin To: "Jakarta Commons Developers List" Content-Transfer-Encoding: 7bit In-Reply-To: <20021130083615.A94797-100000@icarus.apache.org> Message-Id: X-Mailer: Apple Mail (2.482) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N doh! the map can be passed straight into populate. i don't know why i missed this before... - robert On Saturday, November 30, 2002, at 04:39 PM, Craig R. McClanahan wrote: > > > On Thu, 28 Nov 2002, robert burrell donkin wrote: > >> Date: Thu, 28 Nov 2002 20:07:09 +0000 >> From: robert burrell donkin >> Reply-To: Jakarta Commons Developers List > dev@jakarta.apache.org> >> To: Jakarta Commons Developers >> Subject: [beanutils] BeanUtils.copyProperties support for non-simple >> properties...? >> >> the following bug http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14470 >> boils down to copyProperty calling setSimpleProperty rather than >> setProperty. since this is (just) in the java docs, i'm reluctant to >> change this in case there's a good reason why it was written like this. >> >> does anyone know a reason why it was done like this? >> > > The original intent was to perform a "shallow copy" of the properties in > an origin bean to a destination bean, in a manner reminiscent of what the > java.lang.Object.clone() method is supposed to do. > > The issue of non-simple properties only matters for a Map as the source > (and, if we add it, a Map as the destination). This is one of the places > I'm not clear what makes the most sense in our seeming quest to treat Maps > like beans for some purposes. > > Maybe the best thing to do would be to separate out the copy-from-map > operation into a separate method that complements describe()? Such a > method could easily support non-simple properties -- it would be a generic > way to load properties into an entire existing tree. > >> (if it right, i'll improve the documentation and mark the bug as WONTFIX. >> ) >> >> - robert >> > > Craig > > > -- > To unsubscribe, e-mail: org> > For additional commands, e-mail: org> > -- To unsubscribe, e-mail: For additional commands, e-mail: