tpalfy commented on a change in pull request #4655:
URL: https://github.com/apache/nifi/pull/4655#discussion_r522376455



##########
File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/TailFile.java
##########
@@ -610,7 +625,13 @@ public void onTrigger(final ProcessContext context, final 
ProcessSession session
         }
 
         for (String tailFile : states.keySet()) {
-            processTailFile(context, session, tailFile);
+            try {
+                processTailFile(context, session, tailFile);
+            } catch (NulCharacterEncounteredException e) {
+                getLogger().warn("NUL character encountered in " + tailFile + 
" and '" + REREAD_ON_NUL.getDisplayName() + "' is set to 'true', yielding.");
+                context.yield();
+                return;

Review comment:
       It is intentional. Your suggestion makes sense and would be a bit better 
but I think the complexity it would require is not worth it. This should be a 
rare scenario.




----------------------------------------------------------------
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]


Reply via email to