[Licence Header] Use try-with-resources for Files.lines() to prevent file handle leaks#116
Closed
lloydmeta wants to merge 1 commit into
Closed
[Licence Header] Use try-with-resources for Files.lines() to prevent file handle leaks#116lloydmeta wants to merge 1 commit into
lloydmeta wants to merge 1 commit into
Conversation
…file handle leaks Convert Files.lines() usage to try-with-resources pattern to ensure streams are properly closed and prevent file handle exhaustion. See https://technology.lmax.com/posts/adventures-with-files-lines/ Rel https://elasticco.atlassian.net/browse/ENGPRD-1578 Signed-off-by: lloydmeta <lloydmeta@gmail.com>
alpar-t
approved these changes
Jul 31, 2025
Member
Author
|
Thanks for the review @alpar-t
^ this check has been stuck like this for the last 4 hrs 😢 ; any ideas? |
Contributor
|
@lloydmeta as this is a fork, we don't run CI by default - I'm triggering via |
Member
Author
Thanks, looks like the build is failing on misc. other things.
Opened #117 to speed this up. |
Contributor
|
Sorry, missed that you had |
auto-merge was automatically disabled
July 31, 2025 23:23
Pull request was closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Convert Files.lines() usage to try-with-resources pattern to ensure streams are properly closed and prevent file handle exhaustion.
See https://technology.lmax.com/posts/adventures-with-files-lines/
Rel https://elasticco.atlassian.net/browse/ENGPRD-1578