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 36278CDBA for ; Mon, 26 Jan 2015 12:32:35 +0000 (UTC) Received: (qmail 53886 invoked by uid 500); 26 Jan 2015 12:32:35 -0000 Delivered-To: apmail-flex-issues-archive@flex.apache.org Received: (qmail 53717 invoked by uid 500); 26 Jan 2015 12:32:35 -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 53551 invoked by uid 99); 26 Jan 2015 12:32:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jan 2015 12:32:35 +0000 Date: Mon, 26 Jan 2015 12:32:35 +0000 (UTC) From: =?utf-8?Q?Tam=C3=A1s_Nepusz_=28JIRA=29?= To: issues@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (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 Tam=C3=A1s Nepusz created FLEX-34727: ----------------------------------- Summary: ArrayList dispatches a CollectionEvent with an invali= d "items" array after 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 Priority: Trivial Invoking {{removeAll()}} on an {{ArrayList}} dispatches a {{CollectionEvent= }} with kind =3D {{CollectionEvent.RESET}}. According to the documentation = 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}} item= instead, which contradicts the documentation. The issue can easily be fixed by updating {{ArrayList#internalDispatchEvent= ()}} to treat {{RESET}} and {{REFRESH}} events specially so the {{items}} a= rray of the event is never updated in these cases. -- This message was sent by Atlassian JIRA (v6.3.4#6332)