[ http://issues.apache.org/jira/browse/COLLECTIONS-218?page=comments#action_12422391 ] Simon Kitching commented on COLLECTIONS-218: --------------------------------------------
I was a little surprised by the comment that changing void->non-void was binary incompatible, so I checked - and this is indeed the case. Thought I'd just add this comment to confirm it for anyone else wondering. It's a little odd, as method selection during compilation depends only on the parameter types, but my simple test shows it clearly: Exception in thread "main" java.lang.NoSuchMethodError: Target.process(Ljava/lang/String;)V that V at the end indicates the void return type. There is no longer a "Target.process" method taking String and returning void (because it was modified to return String) so..boom. Therefore I have to agree with Steven that unfortunately this change can't be applied. > CollectionUtils.select() does not return passed in collection > ------------------------------------------------------------- > > Key: COLLECTIONS-218 > URL: http://issues.apache.org/jira/browse/COLLECTIONS-218 > Project: Commons Collections > Issue Type: Improvement > Components: Core > Affects Versions: 3.2 > Reporter: Stephen Kestle > Assigned To: Stephen Colebourne > Attachments: CollectionUtils select return.patch > > > collect has the following methods: > Collection collect(Collection inputCollection, final Transformer transformer) > Collection collect(Collection inputCollection, final Transformer transformer, > final Collection outputCollection) > The first creates an ArrayList(), where the second takes an outputCollection > and, for convenience, returns it. > Select (and selectReject) currently the following methods: > Collection select(Collection inputCollection, Predicate predicate) > void select(Collection inputCollection, Predicate predicate, Collection > outputCollection) > I propose changing the bottom method to return the passed in > outputCollection. It would simplify calling code. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]