You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sai Zhang (JIRA)" <ji...@apache.org> on 2010/08/23 21:31:16 UTC
[jira] Created: (COLLECTIONS-360) FilterListIterator#hasNext throws
exception (associate with JUnit tests)
FilterListIterator#hasNext throws exception (associate with JUnit tests)
------------------------------------------------------------------------
Key: COLLECTIONS-360
URL: https://issues.apache.org/jira/browse/COLLECTIONS-360
Project: Commons Collections
Issue Type: Bug
Affects Versions: 3.2
Environment: ubuntu
Reporter: Sai Zhang
Hi,
I found the some of the iterator classes does not fulfill the iterator specification of JDK.
e.g. hasNext() should never throw exception.
Here is an automatically generated junit test (I am now writing a tool)
public void test233() throws Throwable {
java.lang.Integer var6 = new java.lang.Integer(0);
org.apache.commons.collections.list.GrowthList var7 = new org.apache.commons.collections.list.GrowthList(var6);
org.apache.commons.collections.Predicate var9 = org.apache.commons.collections.PredicateUtils.anyPredicate((java.util.Collection)var7);
java.lang.Long var10 = new java.lang.Long(10L);
org.apache.commons.collections.iterators.FilterListIterator var13 = new org.apache.commons.collections.iterators.FilterListIterator(var9);
//this line throws exception!
var13.hasNext();
}
could you please check it to confirm whether it is bug or I misunderstand the specification of apache common collections?
thanks,
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COLLECTIONS-360) FilterListIterator#hasNext throws
exception (associate with JUnit tests)
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COLLECTIONS-360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell updated COLLECTIONS-360:
--------------------------------------
Description:
Hi,
I found the some of the iterator classes does not fulfill the iterator specification of JDK.
e.g. hasNext() should never throw exception.
Here is an automatically generated junit test (I am now writing a tool)
{code:java}
public void test233() throws Throwable {
java.lang.Integer var6 = new java.lang.Integer(0);
org.apache.commons.collections.list.GrowthList var7 = new org.apache.commons.collections.list.GrowthList(var6);
org.apache.commons.collections.Predicate var9 = org.apache.commons.collections.PredicateUtils.anyPredicate((java.util.Collection)var7);
java.lang.Long var10 = new java.lang.Long(10L);
org.apache.commons.collections.iterators.FilterListIterator var13 = new org.apache.commons.collections.iterators.FilterListIterator(var9);
//this line throws exception!
var13.hasNext();
}
{code}
could you please check it to confirm whether it is bug or I misunderstand the specification of apache common collections?
thanks,
was:
Hi,
I found the some of the iterator classes does not fulfill the iterator specification of JDK.
e.g. hasNext() should never throw exception.
Here is an automatically generated junit test (I am now writing a tool)
public void test233() throws Throwable {
java.lang.Integer var6 = new java.lang.Integer(0);
org.apache.commons.collections.list.GrowthList var7 = new org.apache.commons.collections.list.GrowthList(var6);
org.apache.commons.collections.Predicate var9 = org.apache.commons.collections.PredicateUtils.anyPredicate((java.util.Collection)var7);
java.lang.Long var10 = new java.lang.Long(10L);
org.apache.commons.collections.iterators.FilterListIterator var13 = new org.apache.commons.collections.iterators.FilterListIterator(var9);
//this line throws exception!
var13.hasNext();
}
could you please check it to confirm whether it is bug or I misunderstand the specification of apache common collections?
thanks,
> FilterListIterator#hasNext throws exception (associate with JUnit tests)
> ------------------------------------------------------------------------
>
> Key: COLLECTIONS-360
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-360
> Project: Commons Collections
> Issue Type: Bug
> Affects Versions: 3.2
> Environment: ubuntu
> Reporter: Sai Zhang
>
> Hi,
> I found the some of the iterator classes does not fulfill the iterator specification of JDK.
> e.g. hasNext() should never throw exception.
> Here is an automatically generated junit test (I am now writing a tool)
> {code:java}
> public void test233() throws Throwable {
> java.lang.Integer var6 = new java.lang.Integer(0);
> org.apache.commons.collections.list.GrowthList var7 = new org.apache.commons.collections.list.GrowthList(var6);
> org.apache.commons.collections.Predicate var9 = org.apache.commons.collections.PredicateUtils.anyPredicate((java.util.Collection)var7);
> java.lang.Long var10 = new java.lang.Long(10L);
> org.apache.commons.collections.iterators.FilterListIterator var13 = new org.apache.commons.collections.iterators.FilterListIterator(var9);
> //this line throws exception!
> var13.hasNext();
> }
> {code}
> could you please check it to confirm whether it is bug or I misunderstand the specification of apache common collections?
> thanks,
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.