ChainedSet erroneously excludes Objects
Brought to you by:
charliehubbard
The FlexJSON ChainedSet class should only detect real object graph cycles. Currently the implementation uses a standard JDK HashSet as backing set implementation actually failing to do just that.
The use HashSet for this particular use case is inappropriate because the objects equals method is used for checking object equality. In effect objects of different type but with the same hash code exclude each other silently.
The fixed version relies upon JDK's special-purpose IdentityHashMap. In contrast this class checks the objects identity rather than their equality.
Fixed version of ChainedSet