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 <bbende@apache.org>
This commit is contained in:
Mark Payne 2016-10-06 15:39:24 -04:00 committed by Bryan Bende
parent b9cb6b1b47
commit 9304df4de0
No known key found for this signature in database
GPG Key ID: A0DDA9ED50711C39
1 changed files with 1 additions and 0 deletions

View File

@ -145,6 +145,7 @@ public class StreamDemarcator implements Closeable {
System.arraycopy(this.buffer, this.mark, this.buffer, 0, length); System.arraycopy(this.buffer, this.mark, this.buffer, 0, length);
this.index = length; this.index = length;
this.mark = 0; this.mark = 0;
this.readAheadLength = length;
} }
} }