Hey Brian, On May 28, 2011, at 11:33 PM, holenoter wrote:
> > hey chris, > > if you modify an element then call getElements(ProductType) you will not get > the modified element because the product type element map was not updated. . . Are you sure about this? The class stores 2 maps, one of: Element Map: String elementId:->Element Product Type Element Map: String productTypeId:->List of Elements Oh wait, I see. The Elements stored in both maps are references created in the same load function, so both maps reference (initially at least) the same Element instances, which was the intention. However, when the new Element comes in via #modifyElement and is used to set the element definition in the element map, instead of looking up the crossed referenced Element instance, and updating it (thereby keeping both maps up to date, at the same time), I went ahead and just updated the Element Map with the new local instance containing the new definition. This is definitely a bug. I've attached a unit test to OODT-195 that exposes this issue. In the future, feel free to do this yourself too -- it's a good way to quickly demonstrating the issue and saving investigation :-) If no one addresses this by tomorrow, I'll probably just go ahead and a commit a fix that looks up the existing Element reference, and then updates it, which should fix the issue. > .hope hawaii was a good time dude! Thanks! I had a great time and the workshop went really well! Cheers, Chris ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Chris Mattmann, Ph.D. Senior Computer Scientist NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA Office: 171-266B, Mailstop: 171-246 Email: chris.a.mattm...@nasa.gov WWW: http://sunset.usc.edu/~mattmann/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Adjunct Assistant Professor, Computer Science Department University of Southern California, Los Angeles, CA 90089 USA ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++