flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Mclean (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FLEX-26308) ListCollectionView addAllAt causes RTE on filtered collections
Date Mon, 24 Feb 2014 02:25:19 GMT

     [ https://issues.apache.org/jira/browse/FLEX-26308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Justin Mclean resolved FLEX-26308.

       Resolution: Fixed
    Fix Version/s: Apache Flex 4.12.0

> 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
>             Fix For: Apache Flex 4.12.0
> 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

View raw message