Bug #2313
closedindex-of() -- iterator.getAnother() gives incorrect results
100%
Description
The iterate() method of the index-of() function returns an iterator which does not correctly implement the getAnother() method, which is supposed to return a new iterator that returns the same results as the original. getAnother() is used mainly when implementing the last() function, but also has internal uses. The particular iterator returned is an ItemMappingIterator which is stateful, and which does not reset its state when the iterator is cloned. This could also cause problems when multi-threading. I do not have a specific repro: the problem was encountered during 9.7 development when getAnother() was called unnecessarily as a consequence of an unrelated problem. For 9.7 I have reimplemented the iterator used for index-of(), and this will be back-ported to 9.6 to resolve this issue.
Please register to edit this issue