We are upgrading from 2.5.1 to 2.7.0 and am seeing NPE being thrown when 2.5.1 used to throw a TransformerException.The use case iswe are using entity parameter in the XSLT . In 2.5.1, if a parameter is NOT defined but referenced, a TransformerException is thrown. But in 2.7.0, we are getting a NPE instead . Any idea if this is a confirmedchange of behavior in 2.7.0 ?sample XSL snippet<!DOCTYPE xsl:stylesheet [
<!ENTITY MY_ROOT_VALUE '5'>
]>
SAXTransformerFactory tf = (SAXTransformerFactory)SAXTransformerFactory.newInstance();Templates tmp = getTemplates();
if (tmp == null)
{
String msg = "XSL transformer source is null.";
ParserConfigurationException pce = new ParserConfigurationException(msg);
if (m_log != null) m_log.error(msg, pce);
throw pce;
}TransformerHandler th = tf.newTransformerHandler(tmp);
Transformer t = th.getTransformer();//Add any optional parameters
if (m_parameters != null)
{
Iterator i = m_parameters.keySet().iterator();
while (i.hasNext())
{
String name = (String)i.next();
Object value = m_parameters.get(name);
t.setParameter(name, value); --->>> NPE Thrown here.
}
}org.apache.xalan.transformer.TransformerImpl.setParameter(TransformerImpl.java:1558)
at org.apache.xalan.transformer.TransformerImpl.setParameter(TransformerImpl.java:1606)
at com.amx.translationstep.translate (translationstep.java :226)
at ...
- Re: Getting NullPointerException when upgrading from 2.5.1 t... toadie D