DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25920>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25920

ConcurrentModificationException in IterateTag

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From [EMAIL PROTECTED]  2004-03-02 19:38 -------
I think, Dmitri, that you are either misunderstanding the code, or making 
assumptions based on your particular usage.

The 'iterator' here is an iterator over whatever collection the tag instance 
was asked to iterate over. In general, it has *no* relation to the page context 
attributes. The only time they are related is when your particular tag instance 
is iterating over the collection of page context attributes, but that it *not* 
the general case.

The setAttribute() / removeAttribute() calls are making the current element of 
the iteration available for access from within the body of the iterate tag. In 
the case where the current element is null (which is perfectly valid for most 
collections, but *not* for page context attributes, so the test *is* 
necessary), the previous current element must be removed from the page context, 
because otherwise it would appear to be the current value as well, which would 
be wrong.

It would make no sense to use iterator.remove(), as you suggest, because that 
is, in general, a completely different collection from the set of page context 
attributes. We are trying to simply iterate over the collection, not modify it!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to