ppkarwasz commented on code in PR #722:
URL: https://github.com/apache/commons-compress/pull/722#discussion_r2502568867
##########
src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java:
##########
@@ -486,6 +615,30 @@ public static int toNonNegativeInt(final String
description, final long value) t
private final boolean tryToRecoverBrokenArchives;
+ private final int maxEntryNameLength;
+
+ private SevenZFile(final Builder builder) throws IOException {
+ this.channel = builder.getChannel(SeekableByteChannel.class);
+ try {
+ this.fileName = builder.getName();
+ this.maxEntryNameLength = builder.getMaxEntryNameLength();
+ this.maxMemoryLimitKiB = builder.maxMemoryLimitKiB;
+ this.useDefaultNameForUnnamedEntries =
builder.useDefaultNameForUnnamedEntries;
+ this.tryToRecoverBrokenArchives =
builder.tryToRecoverBrokenArchives;
+ final byte[] password = builder.password;
+ archive = readHeaders(password);
+ this.password = password != null ? Arrays.copyOf(password,
password.length) : null;
Review Comment:
Not needed: `password`, `this.password` and `builder.password` have the same
content.
--
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]