Alessandro Colomba <acolomba@xxxxxxxxx> writes:
> The last (I think) question is then, what happens if one:
>
> 1. interns an object v,
> 2. serializes it to file x,
> 3. mutates it,
> 4. serializes it again to file y
> 5. deserializes x and y into v1 and v1.
>
> Would v1 and v2 still be eq?, i.e. would one state of object v
> override the other?
You didn't make it clear whether by "it" you are referring to the
original object or the object returned by intern? Anyway, generally,
mutating interned objects is a bad idea. I mentioned that
elsewhere. Don't do it. Chances are the above would break as early as
serialisation.
Matthias.
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
|