From: Gavin_King/Cirrus%<CI...@ci...> - 2002-02-24 01:36:47
|
> The current implementation using addAll() is only a shallow copy, so > changes to the composition of the set aren't reflected in the copy, > but changes to mutable elements are visible in both. > I guess user should expect that!? Admittedly thats not entirely intuitive. It is at least _determinate_. We still have 2 other alternatives: (1) Fully diff the collections (2) Just not worry about this problem. People should be able to figure out that they are messing with the collection "behind our back" and not be too surprised to see some screwy results. I'm happy with either approach.... |