Updated readInt method so streams are closed on failure or success by srnkan · Pull Request #1476 · processing/processing4
✅ 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