Ah... I had assumed that all writes to that List would take place during initialize(), but I see that isn't the case.
The attached a diff makes mapBuilders a synchronizedList and makes both instances of fieldNames an unmodifiableList. Jeff Schnitzer [EMAIL PROTECTED] > -----Original Message----- > From: Daniel Rall [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 30, 2002 11:57 AM > To: Turbine Torque Developers List > Subject: Re: cvs commit: jakarta-turbine-torque/src/templates/om Object.vm > ObjectWithManager.vm Peer.vm > > "Jeff Schnitzer" <[EMAIL PROTECTED]> writes: > > >> From: Daniel Rall [mailto:[EMAIL PROTECTED]] > >> > >> There are some static members which should probably remain Vector (but > >> be referenced as List). Jeff, would you mind converting the values > >> for the static members back to Vector? > > > > Sure, I can submit another patch, but all the static Lists look fine to > > me: mapBuilders @ Torque.java(169) > > This was the one that I originally saw when scanning the diff. > registerMapBuilder() provides an un-sync'd write interface to > mapBuilders. The easiest way to get thread safety is probably to use > a sync'd List implementation like Vector. > > > fieldNames_ @ Object.vm(640), and > > getFieldNames() returns a reference to the interal fieldNames storage. > A return of a deep copy or an array copy might be more appropriate > here (not that that has much to do with your change). > > > fieldNames_ @ ObjectWithManager(647) > > Same issues as above. > > -- > To unsubscribe, e-mail: <mailto:turbine-torque-dev- > [EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:turbine-torque-dev- > [EMAIL PROTECTED]>
tweaks.diff
Description: tweaks.diff
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
