Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.10.3
-
None
-
Unknown
-
Regression
Description
XsltBuilder.getSource(Exchange e, Object o) tries to convert the payload to a Source.
If you have a byte[] payload, then the following type converter will likely be picked:
InstanceMethodTypeConverter: public javax.xml.transform.sax.SAXSource org.apache.camel.converter.jaxp.XmlConverter.toSAXSource(byte[],org.apache.camel.Exchange) throws java.io.IOException,org.xml.sax.SAXException,javax.xml.transform.TransformerException
This type converter requires the Exchange (InstanceMethodTypeConverter.useExchange == true), but line 461 of XsltBuilder doesn't pass it on.
Therefore, a NullPointerException happens because the conversion method tries to access the Exchange.
Attachments
Issue Links
- breaks
-
CAMEL-5860 Regression in validator component in 2.10.3
- Resolved
- is broken by
-
CAMEL-5866 Pass Exchange param to TypeConverter.convertTo calls where possible
- Resolved