You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Neidhart (JIRA)" <ji...@apache.org> on 2015/11/08 22:13:11 UTC
[jira] [Updated] (COLLECTIONS-307)
SetUniqueList.subList().contains() method checks against full parent list,
not sublist range
[ https://issues.apache.org/jira/browse/COLLECTIONS-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Neidhart updated COLLECTIONS-307:
----------------------------------------
Fix Version/s: 3.2.2
> SetUniqueList.subList().contains() method checks against full parent list, not sublist range
> --------------------------------------------------------------------------------------------
>
> Key: COLLECTIONS-307
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-307
> Project: Commons Collections
> Issue Type: Bug
> Components: List
> Affects Versions: 3.2
> Reporter: Christian Semrau
> Priority: Minor
> Fix For: 3.2.2, 4.0-alpha1, 4.0
>
> Attachments: COLLECTIONS-307.patch
>
>
> The view returned by the subList() method of a SetUniqueList checks contains() against the set of the original list.
> As shown by the following test snippet.
> List list = new ArrayList();
> List uniqueList = SetUniqueList.decorate(list);
> uniqueList.add("Hello");
> uniqueList.add("World");
> List subList = list.subList(0, 0);
> List subUniqueList = uniqueList.subList(0, 0);
> assertFalse(subList.contains("World")); // passes
> assertFalse(subUniqueList.contains("World")); // fails
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)