Return-Path: X-Original-To: apmail-flex-issues-archive@minotaur.apache.org Delivered-To: apmail-flex-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 73D2210F95 for ; Sat, 4 Jan 2014 01:54:50 +0000 (UTC) Received: (qmail 6204 invoked by uid 500); 4 Jan 2014 01:54:50 -0000 Delivered-To: apmail-flex-issues-archive@flex.apache.org Received: (qmail 6186 invoked by uid 500); 4 Jan 2014 01:54:50 -0000 Mailing-List: contact issues-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list issues@flex.apache.org Received: (qmail 6178 invoked by uid 99); 4 Jan 2014 01:54:50 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Jan 2014 01:54:50 +0000 Date: Sat, 4 Jan 2014 01:54:50 +0000 (UTC) From: "Justin Mclean (JIRA)" To: issues@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (FLEX-33913) XMLListCollection addItem(item) modifies a parent XMLList of the item MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLEX-33913?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Justin Mclean reassigned FLEX-33913: ------------------------------------ Assignee: Justin Mclean > XMLListCollection addItem(item) modifies a parent XMLList of the item > --------------------------------------------------------------------- > > Key: FLEX-33913 > URL: https://issues.apache.org/jira/browse/FLEX-33913 > Project: Apache Flex > Issue Type: Bug > Components: .Unspecified - Framework > Affects Versions: Adobe Flex SDK 3.6 (Release), Adobe Flex SDK 4.1 (Release), Apache Flex 4.11.0 > Environment: Reproduced with the SDKs above in FP 11.9 on Windows IE; Likely an issue in all OS/SDK/FP combinations. > Reporter: Stepan Hilbert > Assignee: Justin Mclean > Labels: easytest > > Sample code: > {noformat} > > > > import mx.collections.XMLListCollection; > import mx.controls.Alert; > protected var mainXML:XML = > > > > > ; > > protected function addButton_clickHandler(event:MouseEvent):void > { > trace("Length before adding: " + mainXML.item.length()); // traces '3' > var some:XMLListCollection = new XMLListCollection(); > for each (var o:Object in mainXML.item) { > some.addItem(o); > } > trace("Length After adding: " + mainXML.item.length()); // traces '5' BUT SHOULD BE STILL 3 > } > ]]> > > > > {noformat} > Result: > mainXML.item XMLList is gets modified - the 2nd and 3rd items are added to it. That shouldn't happen and can cause very severe issues. > Workaround: > Do not use XMLListCollection. Array or ArrayCollection seem to be unaffected by this bug. > Related Issues: > This issue might share the same underlying cause: FLEX-21831 -- This message was sent by Atlassian JIRA (v6.1.5#6160)