From 4aaec5aa3878f1abd3c2b98ba7659431f0a8c9c3 Mon Sep 17 00:00:00 2001 From: Tamas Palfy Date: Tue, 17 Nov 2020 20:44:42 +0100 Subject: [PATCH] NIFI-8020 Make sure TailFile doesn't leave FileChannel open when handling NUL characters Signed-off-by: Pierre Villard This closes #4671. --- .../main/java/org/apache/nifi/processors/standard/TailFile.java | 1 + 1 file changed, 1 insertion(+) diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/TailFile.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/TailFile.java index 6343d327e1..8d96e44fb3 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/TailFile.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/TailFile.java @@ -799,6 +799,7 @@ public class TailFile extends AbstractProcessor { if (abort.get() != null) { session.remove(flowFile); + tfo.setState(new TailFileState(tailFile, file, reader, position, timestamp, length, checksum, state.getBuffer())); throw abort.get(); }