Analysis of Mauve failures - Part 2

Bryce McKinlay bryce@waitaki.otago.ac.nz
Fri Apr 5 21:58:00 GMT 2002


Mark Wielaard wrote:
>Where does the definition of structural change come from? Although I
>understand what you say I cannot find this definition in the spec. 
>
It comes from the JCL, IIRC. I don't have my copy handy to check, however.
>So we are interpreting "modification of an collection" as modification
>of the actual "structure" of the collection. 
>
Right, and "structure" modification can be defined as any change to the 
size of the collection or order of the elements.
>But uncommenting the al.add() or the al.remove(o) does throw, but the
>al.remove(new Object()) does not throw.
>
It is interesting that list.remove(object_not_in_list) does not cause 
ConcurrentModificationException, because I also remember interpreting 
something in the JCL as "calling any method that _could_ result in a 
structural change should cause ConcurrentModificationException", but in 
this case it seems that the exception only happens if a change actually 
occurs. Of course, its not uncommon for the JCL to not match the actual 
implementation in current JDKs!
regards
Bryce.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /