Summary: | iteration begin/discard() bug | ||
---|---|---|---|
Product: | Taglibs | Reporter: | Doug Heath <dheath> |
Component: | Standard Taglib | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | EA1 | ||
Target Milestone: | --- | ||
Hardware: | Sun | ||
OS: | Solaris |
Description
Doug Heath
2001-09-19 15:50:21 UTC
Thanks for the bug, Doug. The problem was indeed in discard() but wasn't specifically related to the increment of index, which is just done locally in order to "prime" atEnd(). The problem was that discard() used atEnd() in all cases; atEnd() takes into account 'begin', which is clearly inappropriate until 'begin' is abided by (i.e., in this one particular case). I've fixed by added a discardIgnoreSubset() function. (Note: this part of the implementation could still be cleaned up; I've never really liked this particular strategy and the way that index/count/ getIndex() interact. But I think it's relatively simple and instructive, so I've left it for the moment.) |