[ https://issues.apache.org/jira/browse/COLLECTIONS-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell updated COLLECTIONS-307: -------------------------------------- Attachment: COLLECTIONS-307.patch Two tests and the suggested patch attached. > 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.3 > > 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 is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.