Project

Profile

Help

Bug #2713

closed

NPE from XQuery when catching collection URI resolver exception

Added by Gunther Rademacher about 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Category:
XPath conformance
Sprint/Milestone:
Start date:
2016-04-15
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.7
Fix Committed on Branch:
9.7
Fixed in Maintenance Release:
Platforms:

Description

A test of ours contained some code that used fn:collection with a relative URI inside of try-catch. This now results in a NullPointerException.

I understand that a relative URI now requires a base URI to be set, but apparently the corresponding error message fails to pass through catch processing.

This can be reproduced from command line by

java net.sf.saxon.Query -qs:"try {collection('x/y?select=z.xml')} catch err:FODC0002 {'caught'}"

java.lang.NullPointerException

    at net.sf.saxon.pattern.NameTest.matches(NameTest.java:207)

    at net.sf.saxon.expr.TryCatch.iterate(TryCatch.java:255)

    at net.sf.saxon.expr.Expression.process(Expression.java:887)

    at net.sf.saxon.query.XQueryExpression.run(XQueryExpression.java:408)

    at net.sf.saxon.s9api.XQueryEvaluator.run(XQueryEvaluator.java:370)

    at net.sf.saxon.Query.runQuery(Query.java:900)

    at net.sf.saxon.Query.doQuery(Query.java:442)

    at net.sf.saxon.Query.main(Query.java:111)

Files

NPEfromCatch.java (1.12 KB) NPEfromCatch.java Gunther Rademacher, 2016-04-15 15:19

Please register to edit this issue

Also available in: Atom PDF