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 5c575198ad4774c6682450150c956a3564d0af8b Author: Gary Gregory <[email protected]> AuthorDate: Sun Dec 21 17:57:39 2025 -0500 Javadoc --- .../compress/archivers/sevenz/SevenZFile.java | 23 ++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java index d35072cbb..c762b5b5c 100644 --- a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java +++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java @@ -181,6 +181,13 @@ public static class Builder extends AbstractArchiveBuilder<SevenZFile, Builder> private boolean useDefaultNameForUnnamedEntries = USE_DEFAULTNAME_FOR_UNNAMED_ENTRIES; private boolean tryToRecoverBrokenArchives = TRY_TO_RECOVER_BROKEN_ARCHIVES; + /** + * Constructs a new instance. + */ + public Builder() { + // Default constructor + } + /** * Builds a new {@link SevenZFile}. * @@ -420,6 +427,14 @@ static long bytesToKiB(final long bytes) { return bytes / 1024; } + private static long crc32(final ByteBuffer header) { + final int currentPosition = header.position(); + final CRC32 crc = new CRC32(); + crc.update(header); + header.position(currentPosition); + return crc.getValue(); + } + /** * Checks that there are at least {@code expectRemaining} bytes remaining in the header. * @@ -435,14 +450,6 @@ private static ByteBuffer ensureRemaining(final ByteBuffer header, final long ex return header; } - private static long crc32(final ByteBuffer header) { - final int currentPosition = header.position(); - final CRC32 crc = new CRC32(); - crc.update(header); - header.position(currentPosition); - return crc.getValue(); - } - /** * Wrapper of {@link ByteBuffer#get(byte[])} that checks remaining bytes first. */
