Project

Profile

Help

Bug #1803

closed

java.lang.ClassCastException thrown. Queries using xs:error crashing saxon

Added by O'Neil Delpratt almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Category:
XPath conformance
Sprint/Milestone:
-
Start date:
2013-06-13
Due date:
% Done:

100%

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

Description

There are a number of queries involving xs:error which are causing saxon to crash. For example, the test-case xs:error( () ) throws the exception:

java.lang.ClassCastException: net.sf.saxon.type.ErrorType cannot be cast to net.sf.saxon.type.ListType
	at net.sf.saxon.functions.ConstructorFunctionLibrary.bind(ConstructorFunctionLibrary.java:167)
	at net.sf.saxon.functions.FunctionLibraryList.bind(FunctionLibraryList.java:96)
	at net.sf.saxon.expr.parser.ExpressionParser.parseFunctionCall(ExpressionParser.java:2379)
	at net.sf.saxon.expr.parser.ExpressionParser.parseBasicStep(ExpressionParser.java:1736)
	at net.sf.saxon.expr.parser.ExpressionParser.parseStepExpression(ExpressionParser.java:1659)
	at net.sf.saxon.expr.parser.ExpressionParser.parseRelativePath(ExpressionParser.java:1578)
	at net.sf.saxon.expr.parser.ExpressionParser.parsePathExpression(ExpressionParser.java:1562)
	at net.sf.saxon.expr.parser.ExpressionParser.parseUnaryExpression(ExpressionParser.java:1452)
	at net.sf.saxon.expr.parser.ExpressionParser.parseExprSingle(ExpressionParser.java:517)
	at net.sf.saxon.expr.parser.ExpressionParser.parseExpression(ExpressionParser.java:455)
	at net.sf.saxon.query.QueryParser.parseQuery(QueryParser.java:329)
	at net.sf.saxon.query.QueryParser.makeXQueryExpression(QueryParser.java:140)
	at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:531)
	at net.sf.saxon.s9api.XQueryCompiler.compile(XQueryCompiler.java:454)
...

It has been deemed to not support such edge cases of the spec in the 9.4 releases. However in 9.5 such bugs have been resolved.

Actions #1

Updated by O'Neil Delpratt almost 11 years ago

  • Subject changed from ClassCastException thrown. Queries using xs:error crashing saxon to java.lang.ClassCastException thrown. Queries using xs:error crashing saxon
Actions #2

Updated by O'Neil Delpratt almost 11 years ago

  • Status changed from In Progress to Resolved

Bug fixed. The query now fails more cleanly.

Actions #3

Updated by O'Neil Delpratt almost 11 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to 9.4.0.8

Bug now closed. Successfully applied to the Saxon 9.4.0.8 maintenance release.

Please register to edit this issue

Also available in: Atom PDF