Skip to content

Updated readInt method so streams are closed on failure or success#1476

Open
srnkan wants to merge 1 commit intoprocessing:mainfrom
srnkan:ClosingStreamsIssue
Open

Updated readInt method so streams are closed on failure or success#1476
srnkan wants to merge 1 commit intoprocessing:mainfrom
srnkan:ClosingStreamsIssue

Conversation

@srnkan
Copy link

@srnkan srnkan commented Mar 11, 2026

✅ Title: clear and descriptive

✅ Resolves: Resolves #[1416]

✅ Changes: I adapted the preexisting readInt method to include a try-with-resources, which closes all "closeables" regardless if the code errors or runs smoothly. This stops memory leakage by always closing necessary streams.

✅ Tests: Tests pass the "./gradlew test" and I did not add any additional tests

✅ Checklist: Tests pass the "./gradlew test" tests and branch is up-to-date

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