Bug #3800
closedExpected external object of class java.net.URL, got class net.sf.saxon.value.AnyURIValue
100%
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.
Updated by Michael Kay over 6 years ago
- Status changed from New to Resolved
- Applies to branch 9.8, trunk added
- Fix Committed on Branch 9.8, trunk added
JavaExtensionFunctionCall now exports the static declaredType property. PackageLoaderPE sees this and calls JavaExtensionFunctionCall.adjustRequiredType.
Test case added to xslt30extra.
Updated by Debbie Lockett over 6 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.8.0.14 added
Bug fix applied in the Saxon 9.8.0.14 maintenance release.
Please register to edit this issue