mirror of https://github.com/apache/nifi.git
NIFI-11971: Ensure that when creating a new content claim that we always treat an existing claim length of -1 as 0, to ensure that we never add -1 to our offset
This closes #7631 Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
parent
52cc831a2a
commit
baea7ffee9
|
@ -1977,7 +1977,7 @@ public class FileSystemRepository implements ContentRepository {
|
|||
|
||||
@Override
|
||||
public synchronized ContentClaim newContentClaim() throws IOException {
|
||||
scc = new StandardContentClaim(scc.getResourceClaim(), scc.getOffset() + scc.getLength());
|
||||
scc = new StandardContentClaim(scc.getResourceClaim(), scc.getOffset() + Math.max(0, scc.getLength()));
|
||||
initialLength = 0;
|
||||
bytesWritten = 0L;
|
||||
incrementClaimaintCount(scc);
|
||||
|
|
Loading…
Reference in New Issue