[jdom-commits] CVS Update: jdom/src/java/org/jdom
Jason Hunter
jhunter at servlets.com
Tue Aug 31 12:36:12 PDT 2004
****************************************
Date: Tue Aug 31, 2004 @12:36:12 PDT
Author:
Update of /home/cvs/jdom/src/java/org/jdom
In directory servlets:/tmp/cvs-serv23401
Modified Files:
FilterIterator.java
Log Message:
Patch developed by Brad and me based on a bug report from
Wolfgang Frech:
--
FilterIterator does not comply to the java.util.Iterator spec in the
following detail:
If next() is called on a non-empty FilterIterator without a preceding
hasNext(), the FilterIterator throws a NoSuchElementException.
The expected behavior is: next returns the next element, regardless of
preceding calls to hasNext.
This problem can be avoided by a straightforward workaround: always call
hasNext() before next().
A comment at FilterIterator.remove hints that the author is aware of a
similar problem with a call to remove before hasNext.
--
Simple one-liner.
-jh-
===================================================================
File: no file FilterIterator.java Status: Needs Checkout
Working revision: 1.5 Tue Aug 31 19:36:12 2004
Repository revision: 1.5 /home/cvs/jdom/src/java/org/jdom/FilterIterator.java,v
Existing Tags:
BEFORE_UNCHECKED (revision: 1.4)
jdom_1_0_b10 (revision: 1.4)
jdom_1_0_b10_rc1 (revision: 1.4)
after_rolf (revision: 1.3)
before_rolf (revision: 1.3)
More information about the jdom-commits
mailing list