Closed GoogleCodeExporter closed 9 years ago
Original comment by eriklan.dodinh@gmail.com
on 27 Jan 2015 at 10:27
I cannot reproduce this issue. Do you have an example test for that?
Original comment by eriklan.dodinh@gmail.com
on 27 Jan 2015 at 1:24
Try something like this:
JCasIterator i = SimplePipeline.iteratePipeline(imscwbreader).iterator();
while (i.hasNext()) {
// do nothing
}
Normally, this loop should not terminate, because i.next() is never called.
However, in my experience, it terminates.
Original comment by richard.eckart
on 27 Jan 2015 at 1:47
Tried that, it does not terminate for me after waiting a resonable amount of
time (2 minutes for a 200kb file). I also tried:
JCasIterator i = SimplePipeline.iteratePipeline(imscwbreader).iterator();
int c = 0;
while (i.hasNext()) {
c++;
if (c == 3 || c == 100) {
System.out.println(i.next().getDocumentText());
}
}
It prints the first text in the file, then the second, both as expected.
Do you have an example test file, or a concrete application where this happens?
Original comment by eriklan.dodinh@gmail.com
on 27 Jan 2015 at 2:11
I had such a case, but I "fixed" it ;) I'll try to set one up again.
Original comment by richard.eckart
on 27 Jan 2015 at 2:12
Well, if you call "next", then it terminates. But repeatedly calling hasNext()
without calling next() also terminated for me, but it shouldn't!
Original comment by richard.eckart
on 27 Jan 2015 at 2:13
The point was, hasNext() did not advance the iterator in my test. Also, the two
calls to next() did expectedly not have any impact on the non-termination of my
test, as the test-file has more than 2 texts.
Original comment by eriklan.dodinh@gmail.com
on 27 Jan 2015 at 2:31
Cannot reproduce it either. Looks like I misinterpreted my code and drew false
conclusions. Sorry for the confusion.
Original comment by richard.eckart
on 28 Jan 2015 at 2:21
Original issue reported on code.google.com by
richard.eckart
on 19 Jan 2015 at 8:52