ppkarwasz commented on code in PR #684:
URL: https://github.com/apache/commons-compress/pull/684#discussion_r2265224163
##########
src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java:
##########
@@ -1473,8 +1473,20 @@ private void parseTarHeader(final Map<String, String>
globalPaxHeaders, final by
}
}
- private int parseTarHeaderBlock(final byte[] header, final ZipEncoding
encoding, final boolean oldStyle, final boolean lenient, int offset)
+ /**
+ * Parses a UNIX V7 tar header block.
+ *
+ * @param header The tar entry header buffer to get information from.
+ * @param encoding The encoding to use for file names.
+ * @param oldStyle If {@code true}, file names are parsed using the old
style, i.e. without encoding.
+ * @param lenient If {@code true}, parsing of numeric fields is lenient,
i.e. it will not throw an exception if the field is not a valid octal number.
+ * @return The offset at which the UNIX V7 tar header block ends.
+ * @throws IllegalArgumentException If any of the numeric fields have an
invalid format and lenient is {@code false}.
+ * @throws IOException If an encoding error occurs while parsing the file
name or if the header is malformed.
+ */
+ private int parseTarHeaderBlock(final byte[] header, final ZipEncoding
encoding, final boolean oldStyle, final boolean lenient)
Review Comment:
The parameter was removed since UNIX V7 `tar` header is always be called
with `offset == 0`.
--
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]