Skip to content

Commit

Permalink
Fixed ContentSourceTransformer.
Browse files Browse the repository at this point in the history
Signed-off-by: Simone Bordet <[email protected]>
  • Loading branch information
sbordet committed Dec 13, 2024
1 parent cb2c159 commit 1c32a08
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ public Content.Chunk read()
boolean transformedFailure = Content.Chunk.isFailure(transformedChunk);

// Transformation may be complete, but rawSource is not read until EOF,
// return a non-last transformed chunk to force more read() and transform().
if (transformedLast && !rawLast)
// change to non-last transformed chunk to force more read() and transform().
if (transformedLast && !transformedFailure && !rawLast)
{
if (transformedChunk.isEmpty())
transformedChunk = Content.Chunk.EMPTY;
else if (!transformedFailure)
else
transformedChunk = Content.Chunk.asChunk(transformedChunk.getByteBuffer(), false, transformedChunk);
}

Expand Down

0 comments on commit 1c32a08

Please sign in to comment.