pvillard31 commented on code in PR #10959:
URL: https://github.com/apache/nifi/pull/10959#discussion_r2883014143
##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/TransformXml.java:
##########
@@ -375,10 +380,23 @@ private StreamSource getTemplateSource(final
LookupService<String> lookupService
return streamSource;
}
+ private Source getSource(final InputStream inputStream) {
+ final Source source;
+
+ final StreamSource streamSource = new StreamSource(inputStream);
+ if (secureProcessingEnabled) {
+ final XMLStreamReader streamReader =
STREAM_READER_PROVIDER.getStreamReader(streamSource);
+ source = new StAXSource(streamReader);
+ } else {
+ source = streamSource;
+ }
Review Comment:
should we have a try/catch to be consistent with getSecureSource below?
--
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]