commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Updated: (COLLECTIONS-304) SetUniqueList set method use corrupts uniqness
Date Thu, 11 Sep 2008 10:09:45 GMT

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

Henri Yandell updated COLLECTIONS-304:
--------------------------------------

    Fix Version/s: 3.3

> SetUniqueList set method use corrupts uniqness
> ----------------------------------------------
>
>                 Key: COLLECTIONS-304
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-304
>             Project: Commons Collections
>          Issue Type: Bug
>    Affects Versions: 3.2
>         Environment: JDK 1.6/Windows/Eclipse Ganymede
>            Reporter: RafaƂ Figas
>             Fix For: 3.3
>
>
> When set method is used to put element (Strawberry) on list, then it is possible to add
the same element (Strawberry) with add method. Also you cannot add element (Lemon) that has
been once removed with set method. Reproduction code below:
> List<String> list = new LinkedList<String>();
> SetUniqueList decoratedList = 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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message