Actions
Bug #2203
closedNPE in XsltExecutable with 9.6.0-1
Start date:
2014-10-29
Due date:
% Done:
0%
Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Description
The globals
variable in the code below (from net.sf.saxon.s9api.XsltExecutable@) is used without checking for @null
first.
public HashMap<QName, ParameterDetails> getGlobalParameters() {
List<GlobalVariable> globals = preparedStylesheet.getCompiledGlobalVariables();
HashMap<QName, ParameterDetails> params = new HashMap<QName, ParameterDetails>(globals.size());
for (GlobalVariable v : globals) {
if (v instanceof GlobalParam) {
ParameterDetails details = new ParameterDetails(v.getRequiredType(), v.isRequiredParam());
params.put(new QName(v.getVariableQName()), details);
}
}
return params;
}
This is the relevant part of the stacktrace:
java.lang.NullPointerException: null
at net.sf.saxon.s9api.XsltExecutable.getGlobalParameters(XsltExecutable.java:126)
at net.sf.saxon.jaxp.TransformerImpl.setParameter(TransformerImpl.java:196)
The documentation of Executable.getCompiledGlobalVariables()
says that it may return @null@.
This is a showstopper bug for us so we need to revert to 9.5 until this is addressed.
Related issues
Please register to edit this issue
Actions