Skip to content

fix(readFile): close InputStreamReader in readFile#420

Open
tejasae-afk wants to merge 1 commit intoGumTreeDiff:mainfrom
tejasae-afk:fix/close-inputstreamreader-in-rea
Open

fix(readFile): close InputStreamReader in readFile#420
tejasae-afk wants to merge 1 commit intoGumTreeDiff:mainfrom
tejasae-afk:fix/close-inputstreamreader-in-rea

Conversation

@tejasae-afk
Copy link

readFile is close — The resource opened there can leak if readFile exits on an error path. this patch moves the allocation into try-with-resources so cleanup happens on every exit path. Happy to drop this if it doesn’t fit.

Happy to revise the approach or close this if it doesn’t fit — you know the codebase far better than I do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant