0 Replies Latest reply on Aug 7, 2009 5:25 PM by rfrishbe

    [svn:fx-3.x] 9191: Fixing issues with ObjectUtil.compare().

    rfrishbe Level 3

      Revision: 9191

      Author:   rfrishbe@adobe.com

      Date:     2009-08-07 17:25:45 -0700 (Fri, 07 Aug 2009)

       

      Log Message:

      ***********

      Fixing issues with ObjectUtil.compare().  Thanks to Matt Couch for helping out a lot with this fix.

       

      ObjectUtil.compare() kept a dictionary of objects visited.  It kept a mapping from object->boolean.  When checking to see if two objects were equal, it would first check to see whether one or both of those objects had been visited.  If they both had been visited, then they were equal.  This led to calling compare(, ) being equal.

       

      Now, we keep track of a dictionary of equivalence objects, using something similar to a union-find algorithm.  The dictionary maps objects to other equal objects.

       

      I also fixed another bug around dynamic objects. The compare() test assumed that the only dynamic objects are "Objects" when in fact other classes can be dynamic.

       

      QE notes: -

      Doc notes: -

      Bugs: SDK-22592, SDK-19385

      Reviewer: Hans

      Tests run: checkintests, Joan ran ObjectUtil mxunit tests

      Is noteworthy for integration: no

       

      Ticket Links:

      ************

          http://bugs.adobe.com/jira/browse/SDK-22592

          http://bugs.adobe.com/jira/browse/SDK-19385

       

      Modified Paths:

      **************

          flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/utils/ObjectUtil.as