Skip to content

Close BufferedReader in process_withSingleCrudMode#3441

Open
tejasae-afk wants to merge 3 commits into
scalar-labs:masterfrom
tejasae-afk:fix/close-bufferedreader-in-proces
Open

Close BufferedReader in process_withSingleCrudMode#3441
tejasae-afk wants to merge 3 commits into
scalar-labs:masterfrom
tejasae-afk:fix/close-bufferedreader-in-proces

Conversation

@tejasae-afk
Copy link
Copy Markdown

There might be a small issue in process_withSingleCrudMode_shouldProcessAllDataChunks: The resource opened there can leak if process_withSingleCrudMode_shouldProcessAllDataChunks exits on an error path. this patch moves the allocation into try-with-resources so cleanup happens on every exit path. Let me know if I’m missing context.

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

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request improves resource management in ImportProcessorTest.java by wrapping a BufferedReader in a try-with-resources block to prevent potential leaks. The reviewer suggests applying this change consistently to other test methods in the same file that exhibit the same issue.

@tejasae-afk tejasae-afk force-pushed the fix/close-bufferedreader-in-proces branch from f2398cf to 43b40d8 Compare April 5, 2026 19:21
@tejasae-afk
Copy link
Copy Markdown
Author

Updated — wrapped all remaining BufferedReader instances in try-with-resources across all test methods in the file.

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