Project

Profile

Help

Bug #1834

ClassCastException in XdmNode.getParent()

Added by Michael Kay almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
s9api API
Sprint/Milestone:
-
Start date:
2013-06-28
Due date:
% Done:

100%

Spent time:
-
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
9.5
Fixed in version:
9.5.1.2

Description

In SaxonHE 9.5.1.1, if you have an XdmNode that has no parent and you
call getParent(), you get a class cast exception in:

public XdmNode getParent() {
return (XdmNode) XdmValue.wrap(getUnderlyingNode().getParent());
}

The problem is that getUnderlyingNode().getParent() returns the
instance of the XdmEmptySequence and that's not castable to XdmNode.

Be seeing you,
norm

History

#1 Updated by Michael Kay almost 3 years ago

  • Subject changed from NullPointerException in XdmNode.getParent() to ClassCastException in XdmNode.getParent()
  • Status changed from New to Resolved

Patch committed to Subversion (9.5 and 9.6 branches).

#2 Updated by O'Neil Delpratt over 2 years ago

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

Bug fix applied in the Saxon maintenance release 9.5.1.2

Also available in: Atom PDF