commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brent Worden (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (COLLECTIONS-362) CollectionUtils.filter() should return a boolean indicating whether the Collection was modified as a result of the call.
Date Fri, 20 May 2011 16:58:47 GMT

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

Brent Worden resolved COLLECTIONS-362.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0

r1125466. Changed filter return value to boolean.

> CollectionUtils.filter() should return a boolean indicating whether the Collection was
modified as a result of the call.
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: COLLECTIONS-362
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-362
>             Project: Commons Collections
>          Issue Type: Wish
>          Components: Collection
>    Affects Versions: 3.2
>            Reporter: Jean-Noel Rouvignac
>            Assignee: Brent Worden
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: COLLECTIONS-362.patch
>
>
> Here is what I mean:
> - test 1:
>  List l = new ArrayList();
>  l.add("test");
>  assertTrue( CollectionUtils.filter(l, FalsePredicate.getInstance()) );
>  assertTrue(l.isEmpty());
> - test 2:
>  List l = new ArrayList();
>  l.add("test");
>  assertFalse( CollectionUtils.filter(l, TruePredicate.getInstance()) );
>  assertEquals(1, l.size());

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message