优化模组信息读取速度#6515
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3298d0864
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| public static ZipArchiveReader openZipFile(Path zipFile, Charset charset) throws IOException { | ||
| return new ZipArchiveReader(zipFile, charset); | ||
| return new ZipArchiveReader(openBufferedChannel(zipFile), charset); |
There was a problem hiding this comment.
Close the buffered channel when ZIP initialization fails
When the input is a malformed or truncated ZIP, this channel-based ZipArchiveReader constructor does not close its caller-supplied channel if initialization throws. Previously the Path constructor owned and closed the channel on this failure path; now each failed call leaks a file descriptor, so repeated archive probes can eventually prevent the launcher from opening further files. Wrap reader construction so the buffered channel is closed unless ownership is successfully transferred.
Useful? React with 👍 / 👎.
No description provided.