You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2020/05/06 17:37:13 UTC
[GitHub] [commons-compress] garydgregory commented on a change in pull request #97: COMPRESS-404: Use java.nio.Path in TarArchiveEntry
garydgregory commented on a change in pull request #97:
URL: https://github.com/apache/commons-compress/pull/97#discussion_r420970569
##########
File path: src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
##########
@@ -384,12 +430,49 @@ public TarArchiveEntry(final File file, final String fileName) {
} else {
this.mode = DEFAULT_FILE_MODE;
this.linkFlag = LF_NORMAL;
- this.size = file.length();
+ try {
+ this.size = Files.size(file);
+ } catch (IOException e) {
+ e.printStackTrace();
Review comment:
Let's not dump stacks to the console, very messy when used in a larger software stack.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org