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

Arturo Bernal commented on COLLECTIONS-761:
-------------------------------------------

HI [~ggregory] [~Bruce07]

I have implemented the following test and the incident they comment is not 
reproduced in version 1.1.1

I think we can close this issues
{code:java}
@Test
public void hasNext() {
 Set<String> strings = new HashSet<>();
 strings.add( "this is testtstring" );
 Iterator<String> iterator = strings.iterator();
 List<String> out = IteratorUtils.toList( iterator );
 Iterator<String> stringIterator = out.iterator();
 assertTrue( stringIterator.hasNext() );

}{code}

> org.apache.commons.collections.IteratorUtils.toList() will return empty list 
> when size of iterator is 1
> -------------------------------------------------------------------------------------------------------
>
>                 Key: COLLECTIONS-761
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-761
>             Project: Commons Collections
>          Issue Type: Bug
>    Affects Versions: 3.2.2
>            Reporter: Chen Lingqi
>            Priority: Minor
>
> org.apache.commons.collections.IteratorUtils.toList() will return empty list 
> when size of iterator is 1. In this case, iterator size is 1, return value of 
> iterator.hasNext() is false, therefore, it will return empty list by default.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to