exceptionfactory commented on a change in pull request #4892:
URL: https://github.com/apache/nifi/pull/4892#discussion_r593396421
##########
File path:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java
##########
@@ -1012,63 +981,59 @@ public void onTrigger(ProcessContext context,
ProcessSession session) throws Pro
// cleanup response flowfile, if applicable
- try {
- if (responseFlowFile != null) {
- session.remove(responseFlowFile);
- }
- } catch (final Exception e1) {
- logger.error("Could not cleanup response flowfile due to
exception: {}", new Object[]{e1}, e1);
Review comment:
Since this try-catch block is wrapping a framework-level call to
`session.remove()`, it seems unnecessary. The `responseFlowFile` can be null,
which is being checked. However, if there is some other problem with the value
of `responseFlowFile` at this point, that more likely points to a problem in
the processor itself, should be corrected instead of just logged as an error.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]