garydgregory commented on code in PR #442:
URL: https://github.com/apache/commons-compress/pull/442#discussion_r1402647680
##########
src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java:
##########
@@ -294,6 +294,9 @@ public void resetBlockSize(final int recsPerBlock, final
boolean isCompressed) t
throw new IOException("Block with " + recsPerBlock + " records
found, must be at least 1");
}
blockSize = RECORD_SIZE * recsPerBlock;
+ if (blockSize < 1) {
+ throw new IOException("Block size " + blockSize + " cannot be
negative");
Review Comment:
Either the test or the error message is incorrect. If the test is correct
then the error message should say `"Block size cannot be less than or equal to
0: " + blockSize"`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]