You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by John Vasileff <jv...@hq.marketingcentral.com> on 2001/03/03 06:54:04 UTC
[Xalan-J 2 BUG] - null pointer exception with extension function
There appears to be a bug when an extension function throws an exception. With the DefaultErrorHandler, processing stops there, but when a custom ErrorListener is used that does not throw an exception in its error method, a null pointer exception in XPath.java finishes off the job. My test case shown below involves using a Java ResourceBundle. IMHO, if the key is not found, processing should continue if my ErrorListner lets it.
<xsl:variable name="properties" select="java:java.util.ResourceBundle.getBundle('MyProperties', $locale)"/>
<xsl:value-of select="java:getString($properties, 'myLookupKey')"/>
The simple patch below on XPath.java works for me:
272a273,275
> // avoid null pointer exception when el.error() doesn't throw
> // an exception.
> xobj = new XObject("");
I'm not on the list, so please send replies vie email.
-------------------------------------
John Vasileff
MarketingCentral.com