exceptionfactory commented on code in PR #5986:
URL: https://github.com/apache/nifi/pull/5986#discussion_r855400548
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateXPath.java:
##########
@@ -381,48 +380,6 @@ public void onTrigger(final ProcessContext context, final
ProcessSession session
}
}
- private void doTransform(final Source sourceNode, OutputStream out) throws
TransformerFactoryConfigurationError, TransformerException {
- final Transformer transformer;
- try {
- transformer = TransformerFactory.newInstance().newTransformer();
- } catch (final Exception e) {
- throw new ProcessException(e);
- }
-
- final Properties props = new Properties();
- props.setProperty(OutputKeys.METHOD, "xml");
- props.setProperty(OutputKeys.INDENT, "no");
- props.setProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
- transformer.setOutputProperties(props);
-
- final ComponentLog logger = getLogger();
-
- final AtomicReference<TransformerException> error = new
AtomicReference<>(null);
Review Comment:
That's a good question. This component was the only reference that had a
custom `ErrorListener`. Given that the default `ErrorListener` throws
exceptions on errors, that is the desired standard behavior. Supporting a
custom `ErrorListener` might be useful in future use cases, but it also opens
the door to hiding transform processing problems. For that reason, it seems
best to avoid supporting a custom `ErrorListener` for now, and address it later
if a different use case arises.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]