Project

Profile

Help

Bug #2313

closed

index-of() -- iterator.getAnother() gives incorrect results

Added by Michael Kay almost 10 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XPath conformance
Sprint/Milestone:
Start date:
2015-02-12
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Platforms:

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.

Actions #1

Updated by Michael Kay almost 10 years ago

  • Status changed from New to Resolved

Fix now applied and tested on the 9.6 branch.

Actions #2

Updated by O'Neil Delpratt over 9 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to 9.6.0.5

Bug fix applied in the Saxon 9.6.0.5 maintenance release.

Actions #3

Updated by O'Neil Delpratt almost 9 years ago

  • Sprint/Milestone set to 9.6.0.5
  • Applies to branch 9.6 added
  • Fix Committed on Branch 9.6 added
  • Fixed in Maintenance Release 9.6.0.5 added

Please register to edit this issue

Also available in: Atom PDF