Re: WOXMLCoder uses objectIDRef for mutable objects

2008-07-04 Thread Mike Schrag
One solution I could think to which should work would be to use an IdentityHasMap inside of WOXMLCoder to keep track ofthe objects. I think this is the only solution, actually (ok, not the only solution, but the other solutions are isomorphic to this solution :) ) ms

Re: WOXMLCoder uses objectIDRef for mutable objects

2008-07-04 Thread Timo Hoepfner
uses objectIDRef for mutable objects. IMHO it should only use objectIDRefs, when it encounters an object with the same System.identityHashCode(object) as a previously serialized object. Currently it seems to rely on object.hashCode(), which is OK for immutable objects, but not for mutable ob

Re: WOXMLCoder uses objectIDRef for mutable objects

2008-07-03 Thread Anjo Krank
Neither is OK. object.hashCode is not unique (can be a constant if overridden) and System.identityHashCode is not unique either. Cheers, Anjo Am 03.07.2008 um 22:35 schrieb Timo Hoepfner: FYI: I just filed this as rdar://6053207 Summary: WOXMLCoder uses objectIDRef for mutable

WOXMLCoder uses objectIDRef for mutable objects

2008-07-03 Thread Timo Hoepfner
FYI: I just filed this as rdar://6053207 Summary: WOXMLCoder uses objectIDRef for mutable objects. IMHO it should only use objectIDRefs, when it encounters an object with the same System.identityHashCode(object) as a previously serialized object. Currently it seems to rely on