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 8D3A218835 for ; Wed, 10 Jun 2015 08:00:11 +0000 (UTC) Received: (qmail 79791 invoked by uid 500); 10 Jun 2015 08:00:11 -0000 Delivered-To: apmail-flex-issues-archive@flex.apache.org Received: (qmail 79765 invoked by uid 500); 10 Jun 2015 08:00:11 -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 79754 invoked by uid 99); 10 Jun 2015 08:00:11 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jun 2015 08:00:11 +0000 Date: Wed, 10 Jun 2015 08:00:11 +0000 (UTC) From: "Chris Martin (JIRA)" To: issues@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLEX-34727) ArrayList dispatches a CollectionEvent with an invalid "items" array after removeAll() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLEX-34727?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1458= 0190#comment-14580190 ]=20 Chris Martin commented on FLEX-34727: ------------------------------------- Behavior reproduced in 4.14.1 > ArrayList dispatches a CollectionEvent with an invalid "items" array afte= r removeAll() > -------------------------------------------------------------------------= ------------- > > Key: FLEX-34727 > URL: https://issues.apache.org/jira/browse/FLEX-34727 > Project: Apache Flex > Issue Type: Bug > Components: Collections > Affects Versions: Apache Flex 4.13.0 > Environment: Mac OS X 10.9; very likely to affect other operating= systems as well > Reporter: Tam=C3=A1s Nepusz > Assignee: Chris Martin > Priority: Trivial > Labels: easyfix, easytest > > Invoking {{removeAll()}} on an {{ArrayList}} dispatches a {{CollectionEve= nt}} with kind =3D {{CollectionEvent.RESET}}. According to the documentatio= n of the {{items}} property of {{CollectionEvent}}, > {quote} > When the kind is CollectionEventKind.REFRESH or CollectionEventKind.RESET= , this array has zero length. > {quote} > The event dispatched from the {{ArrayList}} contains a single {{null}} it= em instead, which contradicts the documentation. > The issue can easily be fixed by updating {{ArrayList#internalDispatchEve= nt()}} to treat {{RESET}} and {{REFRESH}} events specially so the {{items}}= array of the event is never updated in these cases. -- This message was sent by Atlassian JIRA (v6.3.4#6332)