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

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

Hello [~ferra] 

Thank you for your report.

The test you provided does not compile and does not run under JUnit as the 
method is not annotated with `@Test`.

I added a test that is similar and passes in git master: 
{{org.apache.commons.collections4.CollectionUtilsTest.testSelect_Iterable_Predicate_Collection_JiraCollections864()}}

I'll decline as cannot reproduce.

Feel free to create a PR on GitHub 
[https://github.com/apache/commons-collections/]

If you want to show a bug, you must provide a failing test.

TY!

> Documentation Bug: CollectionUtils.select(Iterable<? extends ? extends 
> InstanceofPredicate>, Predicate<? super ? extends InstanceofPredicate>, 
> LinkedList<InstanceofPredicate>)
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: COLLECTIONS-864
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-864
>             Project: Commons Collections
>          Issue Type: Bug
>            Reporter: Daniele
>            Priority: Minor
>
> *CollectionUtils.select(Iterable<? extends ? extends InstanceofPredicate>, 
> Predicate<? super ? extends InstanceofPredicate>, 
> LinkedList<InstanceofPredicate>):*
> A ConcurrentModificationException can be raised but not mentioned in  the 
> specification.
> *Test used:*
> {code:java}
> public class CollectionUtils_11_failure_Test{
>     
>     public void testSelect_OutputCollection() throws Throwable {
>         UniquePredicate<Object> uniquePredicate0 = new 
> UniquePredicate<Object>();
>         LinkedList<InstanceofPredicate> linkedList0 = new 
> LinkedList<InstanceofPredicate>();
>         Class<InstanceofPredicate> class0 = InstanceofPredicate.class;
>         InstanceofPredicate instanceofPredicate0 = new 
> InstanceofPredicate(class0);
>         try {
>             _methodResult__ = CollectionUtils.select((Iterable<? extends 
> InstanceofPredicate>) linkedList0, (Predicate<? super InstanceofPredicate>) 
> uniquePredicate0, linkedList0);
>         } catch (ConcurrentModificationException e) {
>             org.junit.Assert.fail();
>         }
>     }
> } {code}



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

Reply via email to