[ 
https://issues.apache.org/jira/browse/COLLECTIONS-882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18051100#comment-18051100
 ] 

Gary D. Gregory commented on COLLECTIONS-882:
---------------------------------------------

Hello [~anuragagarwal56] 

Since {{Iterable}} is an interface without documented boundaries, any type can 
implement it without any such restrictions.

We don't want to break binary compatibility, so changing the return type is not 
an option within the 4.x release line.

A possibility would be to create a new API with a different return type, but I 
would question whether it's worth cluttering the API for this.

 

 

> IterableUtils.countMatches should return int
> --------------------------------------------
>
>                 Key: COLLECTIONS-882
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-882
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Iterator
>            Reporter: Anurag Agarwal
>            Priority: Minor
>
> IterableUtils.countMatches internally uses size to compute the size of the 
> collection which return int, but the method itself returns long.
>  
> Moreover since the input is an iterable, I don't know if it makes sense for 
> an iterable to be longer than int bounds



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to