From 9304df4de060335526d29a77aa093db4004c8b2e Mon Sep 17 00:00:00 2001 From: Mark Payne Date: Thu, 6 Oct 2016 15:39:24 -0400 Subject: [PATCH] NIFI-2865: Fixed bug in StreamDemarcator that is exposed when the final bit of data in a stream is smaller than the previous and the previous demarcation ended on a buffer length boundary This closes #1110. Signed-off-by: Bryan Bende --- .../java/org/apache/nifi/stream/io/util/StreamDemarcator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/util/StreamDemarcator.java b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/util/StreamDemarcator.java index dc3d829aa7..840bdb04a1 100644 --- a/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/util/StreamDemarcator.java +++ b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/util/StreamDemarcator.java @@ -145,6 +145,7 @@ public class StreamDemarcator implements Closeable { System.arraycopy(this.buffer, this.mark, this.buffer, 0, length); this.index = length; this.mark = 0; + this.readAheadLength = length; } }