Actions
Bug #2851
closedXQuery -explain throws NPE: Internal error: expression () has no retained static context
Start date:
2016-07-21
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
9.7, trunk
Fix Committed on Branch:
9.7, trunk
Fixed in Maintenance Release:
Platforms:
Description
A NullPointerException has been observed, following a filter elimination message, when using the -explain option of command line XQuery, This can be reproduced by
0[1=2]
OPT ======================================
OPT : At line -1 of null
OPT : Filter expression eliminated because predicate is always false
OPT ====== Expression after rewrite ======
java.lang.NullPointerException: Internal error: expression () has no retained static context
at net.sf.saxon.expr.Expression.getConfiguration(Expression.java:1097)
at net.sf.saxon.expr.Expression.explain(Expression.java:995)
at net.sf.saxon.expr.parser.Optimizer.trace(Optimizer.java:400)
at net.sf.saxon.expr.FilterExpression.optimize(FilterExpression.java:349)
at net.sf.saxon.query.XQueryExpression.<init>(XQueryExpression.java:85)
at net.sf.saxon.Configuration.makeXQueryExpression(Configuration.java:3357)
at net.sf.saxon.query.XQueryParser.makeXQueryExpression(XQueryParser.java:175)
at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:589)
at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:652)
at net.sf.saxon.s9api.XQueryCompiler.compile(XQueryCompiler.java:606)
at net.sf.saxon.Query.compileQuery(Query.java:795)
at net.sf.saxon.Query.doQuery(Query.java:343)
at net.sf.saxon.Query.main(Query.java:111)
Fatal error during query: java.lang.NullPointerException: Internal error: expression () has no retained static context
Tested on Saxon-HE 9.7.0.7.
Please register to edit this issue
Actions