RE: question on iterators
"Krijgsheld, Ronald" <[email protected]> Wed, 25 Jun 2003 17:16:00 +0200
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.devel |
|---|---|
| Message-ID | <D913221A882FD31198D90008C75D690906BF0CB7@cwnl-ams-pri01.nl.compuware.com> |
Hi, I made a dump of cvs a week ago, I think. but I'll make sure. I'll try to make a testset. Ronald -----Original Message----- From: Martin Matula [mailto:[email protected]] Sent: Wednesday, June 25, 2003 5:06 PM To: [email protected] Subject: Re: [mdr-dev] question on iterators Hi, we had some problems with iterators in the past - basically the same behavior that you describe, but it was not necessarily related to concurent updates in the MDR while iterating. This bug was fixed several months ago I believe. Is there a chance that the version of MDR you are using is quite old and still has that bug? If not, we will probably need a test case to reproduce it in order to be able to fix it. If you could create a short program that reproduces the bug, that would be great. Martin Krijgsheld, Ronald wrote: > Hi Martin, > > It does not throw a ConcurrentModificationException, it returns false from > hasNext(). I checked if there are subtyped created but that is not the case. > > > I tried to trace what happens inside MDR, but have to dive in some deeper to > fully understand the btree logic. > > Also, when I make a copy of that collection and then iterate, everything > runs fine. any suggestions on how to proceed? > > Ronald. > > -----Original Message----- > From: Martin Matula [mailto:[email protected]] > Sent: Wednesday, June 25, 2003 4:23 PM > To: [email protected] > Subject: Re: [mdr-dev] question on iterators > > > Hi Ronald, > how does the iterator stop? Does it throw > ConcurrentModificationException? Or it just returns false from hasNext? > allOfType returns not only instances of a specific type but also of its > subtypes. Are you sure you are not adding any of those? > Martin > > Krijgsheld, Ronald wrote: > >>Hello, >> >>I am interested in the lifespan of an iterator. >> >>What I mean is that I query on some factory all instances with > > refAllOfType > >>and then get an iterator from that collection. While iterating over that >>collection I insert a lot of other thingies in the repository, but not >>anything of the type over which I am iterating. >> >>Now, my iteration stops after one step, while there are five elements in >>that collection. >> >>Do I use the iterator illegally? >> >>Bye, >> >>Ronald Krijgsheld >> >> > > > > -- The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.