commit | b1ad13c83588d9206ceb8a157acb9bdb7fdbd4f8 | [log] [tgz] |
---|---|---|
author | Mark Payne <markap14@hotmail.com> | Mon Jun 21 10:19:27 2021 -0400 |
committer | Matthew Burgess <mattyb149@apache.org> | Mon Jun 21 12:55:17 2021 -0400 |
tree | 5dcab35e66a33e2b440a854c6a51fcfdc46e1de0 | |
parent | 2efc2b6b8b309aa198143e02084449a6069d7e62 [diff] |
NIFI-8719: Ensure that when OutputStream is returned from StandardProcessSession.write, upon close of the OutputStream we close the underlying resources. Signed-off-by: Matthew Burgess <mattyb149@apache.org> This closes #5170
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java index e5dbc97..614abc4 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java
@@ -2824,6 +2824,9 @@ } closed = true; + + countingOut.close(); + rawStream.close(); writeRecursionSet.remove(sourceFlowFile); final long bytesWritten = countingOut.getBytesWritten();