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.
Updated by Michael Kay almost 4 years ago
- Status changed from New to Resolved
- Applies to branch 10, 9.9 added
- Fix Committed on Branch 10, 9.9 added
Patched in StyleElement.typeCheck()
.
Updated by O'Neil Delpratt almost 4 years ago
- % Done changed from 0 to 100
- Fixed in Maintenance Release 10.1 added
Bug fix committed in the Saxon 10.1 maintenance release.
Updated by O'Neil Delpratt over 3 years ago
- Status changed from Resolved to Closed
- Fixed in Maintenance Release 10.2, 9.9.1.8 added
- Fixed in Maintenance Release deleted (
10.1)
Bug fix applied on the Saxon 9.9.1.8 maintenance release.
Please register to edit this issue
Actions