This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-compress.git
commit ae932bbff4ca35b8a69d469314b2262509da7e18 Author: Gary D. Gregory <garydgreg...@gmail.com> AuthorDate: Sun Dec 29 09:21:10 2024 -0500 Flip test and avoid empty block --- .../apache/commons/compress/utils/FixedLengthBlockOutputStream.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/org/apache/commons/compress/utils/FixedLengthBlockOutputStream.java b/src/main/java/org/apache/commons/compress/utils/FixedLengthBlockOutputStream.java index 43c8703c4..9039d45ce 100644 --- a/src/main/java/org/apache/commons/compress/utils/FixedLengthBlockOutputStream.java +++ b/src/main/java/org/apache/commons/compress/utils/FixedLengthBlockOutputStream.java @@ -222,9 +222,7 @@ public class FixedLengthBlockOutputStream extends OutputStream implements Writab throw new ClosedChannelException(); } final int srcRemaining = src.remaining(); - - if (srcRemaining < buffer.remaining()) { - } else { + if (srcRemaining >= buffer.remaining()) { int srcLeft = srcRemaining; final int savedLimit = src.limit(); // If we're not at the start of buffer, we have some bytes already buffered