Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-26802

[localfix] ObjectUtils.clone messes up with Array internals

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Adobe Flex SDK 4.1 (Release)
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1. Rin this code:
      import mx.utils.ObjectUtil;
      private var someArray:Array = [

      {label:"Two"}

      ];
      protected function bug_clickHandler(event:MouseEvent):void
      {
      someArray = ObjectUtil.clone(someArray) as Array;
      //someArray.pop();
      for each (var o2:Object in someArray)

      { trace(o2.label); }

      }

      Actual Results:

      • a null pointer exception

      Expected Results:

      • trace "Two"

      You can un-comment the pop too. In this case you have the "for in" running inside an empty Array.

      Workaround (if any):

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: