#506 NullPointerException in AxisExpression

v8.7.1
closed
Michael Kay
5
2012-10-08
2006-04-24
Michael Kay
No

This problem occurs in Saxon-SA only.

Symptom: java.lang.NullPointerException
at
net.sf.saxon.expr.AxisExpression.typeCheck(AxisExpression.java:128)

cause: an axis expression of the form /ABC is being
type-checked against the known type of the document
node; but the type information indicates that the
document node allows any kind of child element.

Source fix: line 128 of AxisExpression.java, change

if (selected.intersect(requiredNames).isEmpty()) {

to

if (selected != null &&
selected.intersect(requiredNames).isEmpty()) {

This problem is new in Saxon 8.7.1 (in previous
releases, the type checking was unintentionally omitted).

Discussion