Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-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 38005D2D3 for ; Thu, 28 Feb 2013 19:39:18 +0000 (UTC) Received: (qmail 78727 invoked by uid 500); 28 Feb 2013 19:39:15 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 78649 invoked by uid 500); 28 Feb 2013 19:39:15 -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 78576 invoked by uid 99); 28 Feb 2013 19:39:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Feb 2013 19:39:15 +0000 Date: Thu, 28 Feb 2013 19:39:15 +0000 (UTC) From: "Thomas Neidhart (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Reopened] (COLLECTIONS-304) SetUniqueList set method use corrupts uniqness 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/COLLECTIONS-304?page=3Dcom.atl= assian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Neidhart reopened COLLECTIONS-304: ----------------------------------------- =20 > 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: 4.0 > > Attachments: COLLECTIONS-304.patch, 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()); -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira