Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 60767 invoked from network); 4 Nov 2008 00:24:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Nov 2008 00:24:06 -0000 Received: (qmail 62796 invoked by uid 500); 4 Nov 2008 00:24:11 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 62734 invoked by uid 500); 4 Nov 2008 00:24:11 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 62722 invoked by uid 99); 4 Nov 2008 00:24:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Nov 2008 16:24:11 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Nov 2008 00:23:02 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 46DDB234C26A for ; Mon, 3 Nov 2008 16:23:44 -0800 (PST) Message-ID: <1787990367.1225758224289.JavaMail.jira@brutus> Date: Mon, 3 Nov 2008 16:23:44 -0800 (PST) From: "Bjorn Townsend (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (COLLECTIONS-304) SetUniqueList set method use corrupts uniqness In-Reply-To: <1452197073.1220611544475.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COLLECTIONS-304?page=3Dcom.atl= assian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bjorn Townsend updated COLLECTIONS-304: --------------------------------------- Attachment: Commons-304-test.diff Here's a JUnit test reproducing this. Nice catch. :) > SetUniqueList set method use corrupts uniqness > ---------------------------------------------- > > Key: COLLECTIONS-304 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-30= 4 > Project: Commons Collections > Issue Type: Bug > Affects Versions: 3.2 > Environment: JDK 1.6/Windows/Eclipse Ganymede > Reporter: Rafa=C5=82 Figas > Fix For: 3.3 > > Attachments: Commons-304-test.diff > > > When set method is used to put element (Strawberry) on list, then it is p= ossible to add the same element (Strawberry) with add method. Also you cann= ot add element (Lemon) that has been once removed with set method. Reproduc= tion code below: > List list =3D new LinkedList(); > SetUniqueList decoratedList =3D SetUniqueList.decorate(list); > decoratedList.add("Apple"); > decoratedList.add("Lemon"); > decoratedList.add("Orange"); > System.out.println(decoratedList.toString()); > decoratedList.set(1, "Strawberry"); > System.out.println(decoratedList.toString()); > decoratedList.add(1, "Strawberry"); > System.out.println(decoratedList.toString()); > decoratedList.add(1, "Lemon"); > System.out.println(decoratedList.toString()); --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.