Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 20165200B96 for ; Thu, 6 Oct 2016 22:11:59 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1E8D4160AF1; Thu, 6 Oct 2016 20:11:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5E253160AF0 for ; Thu, 6 Oct 2016 22:11:58 +0200 (CEST) Received: (qmail 11861 invoked by uid 500); 6 Oct 2016 20:11:57 -0000 Mailing-List: contact commits-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list commits@nifi.apache.org Received: (qmail 11718 invoked by uid 99); 6 Oct 2016 20:11:57 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2016 20:11:57 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 297ACE946C; Thu, 6 Oct 2016 20:11:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bbende@apache.org To: commits@nifi.apache.org Date: Thu, 06 Oct 2016 20:12:01 -0000 Message-Id: <63393fa240eb4fc29cbe0495cf27d9a9@git.apache.org> In-Reply-To: <2c92bc22068f4ba68d4839a69a3c4cb7@git.apache.org> References: <2c92bc22068f4ba68d4839a69a3c4cb7@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [6/6] nifi git commit: 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 archived-at: Thu, 06 Oct 2016 20:11:59 -0000 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 Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/9304df4d Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/9304df4d Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/9304df4d Branch: refs/heads/master Commit: 9304df4de060335526d29a77aa093db4004c8b2e Parents: b9cb6b1 Author: Mark Payne Authored: Thu Oct 6 15:39:24 2016 -0400 Committer: Bryan Bende Committed: Thu Oct 6 15:51:37 2016 -0400 ---------------------------------------------------------------------- .../main/java/org/apache/nifi/stream/io/util/StreamDemarcator.java | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/9304df4d/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/util/StreamDemarcator.java ---------------------------------------------------------------------- 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 dc3d829..840bdb0 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; } }