#986 NPE calling overloaded extension function in saxon:evaluate

v9.2
closed
Michael Kay
5
2012-10-08
2009-09-16
Michael Kay
No

A NullPointerException occurs if the XPath expression supplied as an argument to saxon:evaluate() (or saxon:expression()) contains a call on a Java extension function that maps to an overloaded Java method. For example:

<xsl:value-of select="saxon:evaluate('Math:abs(-1)') xmlns:Math=" java:java.lang.Math"=""/>

A patch (to module JavaExtensionLibrary) is being added to Subversion on the 9.1 and 9.2 branches. The same code is also present in DotNetExtensionLibrary and the same fix is being applied there. Only the Java version has been tested. Test case added to Saxon XSLT test suite: evaluate027.

Discussion

  • Michael Kay
    Michael Kay
    2009-10-29

    Fixed in 9.2.0.3 and in 9.1.0.8