Project

Profile

Help

Bug #2501

closed

NPE supplying parentless element to XPathSelector.setContextItem

Added by Michael Kay over 8 years ago. Updated over 8 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

Please register to edit this issue

Also available in: Atom PDF