0 Replies Latest reply on Mar 17, 2009 6:53 AM by Peter Farland

    [svn:fx-3.0.1.x] 5344: Fixing SwcFile.equals() to compare its VirtualFile rather than comparing an instance' s VirtualFile to a SwcFile instance.

    Peter Farland Level 3
      Revision: 5344
      Author: pfarland@adobe.com
      Date: 2009-03-17 07:53:17 -0700 (Tue, 17 Mar 2009)

      Log Message:
      -----------
      Fixing SwcFile.equals() to compare its VirtualFile rather than comparing an instance's VirtualFile to a SwcFile instance. This worked in many scenarios on Sun's JDK as its HashMap.get() implementation has an optimization that tests entry.key == key before calling .equals(). IBM 1.6 HashMap.get() calls .equals() and thus runs into this error for many VirtualFile implementations (as they typically only consider entities equal if they are of the same type, and clearly InMemoryFile != SwcFile).

      Also adding a workaround in ASC for now to avoid an infinite cycle of Multinames put() -> checkDelegate() -> super.putAll() -> put(). I'll transfer SDK-18978 to ASC for further investigation.

      QE: Yes, please retest.
      Doc: No
      Checkintests: Pass
      Reviewer: Paul, Erik

      Bugs:
      SDK-19971 - Nullpointer with IBM JDK 1.6
      SDK-18978 - Can't compile mxml app using IBM JDK 1.6.

      Ticket Links:
      ------------
      http://bugs.adobe.com/jira/browse/SDK-18978
      http://bugs.adobe.com/jira/browse/SDK-19971
      http://bugs.adobe.com/jira/browse/SDK-18978

      Modified Paths:
      --------------
      flex/sdk/branches/3.0.1.x/lib/asc.jar
      flex/sdk/branches/3.0.1.x/modules/asc/src/java/macromedia/asc/util/Multinames.java
      flex/sdk/branches/3.0.1.x/modules/compiler/src/java/flex2/compiler/swc/SwcFile.java