This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Analysis of Mauve failures - Part 2


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.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]