[
https://issues.apache.org/jira/browse/COMPRESS-342?focusedWorklogId=338473&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-338473
]
ASF GitHub Bot logged work on COMPRESS-342:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 05/Nov/19 03:17
Start Date: 05/Nov/19 03:17
Worklog Time Spent: 10m
Work Description: PeterAlfreadLee commented on issue #83: COMPRESS-342
random access of 7z files
URL: https://github.com/apache/commons-compress/pull/83#issuecomment-549645550
Modified the code a little bit:
```
// if this is called in a random access, then the content methods of
previous entry may be null
// the content methods should be set to methods of the first entry as it
must not be null
if(currentEntryIndex != entryIndex) {
int folderFirstFileIndex =
archive.streamMap.folderFirstFileIndex[folderIndex];
SevenZArchiveEntry folderFirstFile = archive.files[folderFirstFileIndex];
file.setContentMethods(folderFirstFile.getContentMethods());
}
```
When called in a random access, the content methods should be set to methods
of the first entry in folder, instead of the methods of the previous entry in
folder.
That's because the content methods of the previous entry may be null as it's
a random access.
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 338473)
Time Spent: 1h 40m (was: 1.5h)
> random access of 7z files
> -------------------------
>
> Key: COMPRESS-342
> URL: https://issues.apache.org/jira/browse/COMPRESS-342
> Project: Commons Compress
> Issue Type: Sub-task
> Components: Archivers
> Reporter: Stefan Bodewig
> Priority: Major
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)