Project

Profile

Help

Bug #2501

closed

NPE supplying parentless element to XPathSelector.setContextItem

Added by Michael Kay about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
s9api API
Sprint/Milestone:
Start date:
2015-11-18
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

If the XdmItem passed to XPathSelector.setContextItem() in the s9api interface is a parentless element, an NPE occurs with the call on getDocumentRoot().isTyped().

(According to the CVS log, this code was committed on 05/08/15, which I think means 8 May rather than 5 August. The commit was described as "fix bug 2235" though the connection with that bug seems obscure. I think bug 2435 was meant. The code is attempting to prevent typed input being used with a non-schema-aware XPath expression, as this can cause some rather obscure failures.)

The bug is reported to occur in 9.6.0.7 but not in 9.6.0.6

Actions #1

Updated by Michael Kay about 9 years ago

  • Status changed from New to In Progress
  • Found in version set to 9.6

Patched on the 9.6 Java branch.

No patch needed on the 9.7 branch (as a result of the introduction of the TreeInfo object which exists even for parentless trees)

Patch still needed on .NET

Actions #2

Updated by Michael Kay about 9 years ago

  • Status changed from In Progress to Resolved

The patch was applied to the .NET version of the code on 2015-11-19.

Actions #3

Updated by O'Neil Delpratt about 9 years ago

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

Bug fix applied in the Saxon 9.6.0.8 maintenance release

Actions #4

Updated by O'Neil Delpratt about 9 years ago

  • Applies to branch 9.6 added
  • Fix Committed on Branch 9.6 added
  • Fixed in Maintenance Release 9.6.0.8 added
Actions #5

Updated by O'Neil Delpratt about 9 years ago

  • Sprint/Milestone set to 9.6.0.8

Please register to edit this issue

Also available in: Atom PDF