Project

Profile

Help

Bug #3800

closed

Expected external object of class java.net.URL, got class net.sf.saxon.value.AnyURIValue

Added by Michael Kay almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Saxon extensions
Sprint/Milestone:
-
Start date:
2018-05-30
Due date:
% Done:

100%

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

Description

See forum post https://saxonica.plan.io/boards/3/topics/7196

The issue here is that given an external Java call JarURLConnection::getURL() with a declared return type of java.net.URL, the default conversion would turn this into an xs:anyURI value. But because the result is bound to a variable with required type javatype:java.net.URL, the static type checking calls JavaExtensionFunctionCall.adjustRequiredType(), and this changes the conversion applied to the result value. However, adjustRequiredType is not called when the stylesheet is reloaded from a SEF file, and in fact the information required to do this is not present in the SEF file.

Please register to edit this issue

Also available in: Atom PDF