Actions
Bug #4534
closedNullPointerException with invalidly-initialized global variable
Start date:
2020-04-30
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
10, 9.9
Fix Committed on Branch:
10, 9.9
Description
This typo (note the spurious “)” inside the putative QName):
<xsl:variable name="dbe:INVALID-INJECT"
select="xs:QName('dbe:INVALID-INJECT)')"/>
Causes an NPE in Saxon EE 10.0:
java.lang.NullPointerException
at net.sf.saxon.expr.Expression.getRetainedStaticContext(Expression.java:462)
at net.sf.saxon.expr.parser.LoopLifter.process(LoopLifter.java:50)
at net.sf.saxon.expr.parser.ExpressionTool.optimizeComponentBody(ExpressionTool.java:1075)
at net.sf.saxon.style.XSLGlobalVariable.optimize(XSLGlobalVariable.java:370)
Saxon spots the invalid QName at compile time and generates an ErrorExpression
, but fails to assign it a RetainedStaticContext, causing the NPE when loop-lifting optimization later visits the expression.
Please register to edit this issue
Actions