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 15AB010D78 for ; Mon, 24 Feb 2014 02:23:23 +0000 (UTC) Received: (qmail 58975 invoked by uid 500); 24 Feb 2014 02:23:22 -0000 Delivered-To: apmail-flex-issues-archive@flex.apache.org Received: (qmail 58956 invoked by uid 500); 24 Feb 2014 02:23:22 -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 58832 invoked by uid 99); 24 Feb 2014 02:23:21 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Feb 2014 02:23:21 +0000 Date: Mon, 24 Feb 2014 02:23:21 +0000 (UTC) From: "Justin Mclean (JIRA)" To: issues@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Reopened] (FLEX-26308) ListCollectionView addAllAt causes RTE on filtered collections 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-26308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Justin Mclean reopened FLEX-26308: ---------------------------------- Assignee: Justin Mclean (was: Adobe JIRA) Has now been fixed. > ListCollectionView addAllAt causes RTE on filtered collections > -------------------------------------------------------------- > > Key: FLEX-26308 > URL: https://issues.apache.org/jira/browse/FLEX-26308 > Project: Apache Flex > Issue Type: Bug > Components: Collections > Affects Versions: Adobe Flex SDK 4.1 (Release) > Environment: Affected OS(s): All OS Platforms > Affected OS(s): All OS Platforms > Browser: Internet Explorer 8.x > Language Found: English > Reporter: Adobe JIRA > Assignee: Justin Mclean > Priority: Minor > > Steps to reproduce: > 1.Create an ArrayCollection with multiple items. > 2.Apply a filter function that filters all items out. > 3.Use the addAll method to add multiple items to the original collection while it's filtered. > > Actual Results: > A RangeError saying "Index '1' specified is out of bounds." > > Expected Results: > No error and items to all be added to the source list. > > Workaround (if any): > Create a for each loop that uses addItem instead. > The problem seems to lie in the ListCollectionView.addAllAt method. It loops over the addList using a for loop and attempts to addItemAt with each one, incrementing the index it adds at. addItemAt throws a RangeError if the index is greater than the length (which will be 0 if the filter applies to all items in the collection) so after the first item is added at index 0, the next item is attempted to be added at index 1 which is greater than the length of 0 and a RangeError is thrown. > Found in the Flex SDK 4.1 release build 16076 -- This message was sent by Atlassian JIRA (v6.1.5#6160)