Project

Profile

Help

Bug #3972

XPathExpression.evaluateSingle() does not close the iterator

Added by Michael Kay over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Performance
Sprint/Milestone:
-
Start date:
2018-10-14
Due date:
% Done:

100%

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

Description

The method XPathExpression.evaluateSingle() is defined to return the first item in the result even if there are several. To accomplish this it opens an iterator and reads off the first item. The iterator is not closed. For some iterators, failing to close the iterator either explicitly or by exhausting its contents may cause resources to be retained. This happens most notably with streaming (where the expression is saxon:stream()); it can also happen with some kinds of CollectionIterator.

History

#1 Updated by Michael Kay over 3 years ago

  • Status changed from In Progress to Resolved

Changed on the 9.9 branch to close the iterator.

#2 Updated by O'Neil Delpratt about 3 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.9.0.2 added

Bug fix applied to the Saxon 9.9.0.2 maintenance release.

Please register to edit this issue

Also available in: Atom PDF