Skip to content

Fix resource leaks in get() and post() using try-with-resources#126

Open
diptipradeep wants to merge 1 commit intoaliAljaffer:masterfrom
diptipradeep:fix-resource-leaks
Open

Fix resource leaks in get() and post() using try-with-resources#126
diptipradeep wants to merge 1 commit intoaliAljaffer:masterfrom
diptipradeep:fix-resource-leaks

Conversation

@diptipradeep
Copy link
Contributor

This PR resolves resource management issues in APIClient.java by applying try-with-resources to ensure proper closure of streams.

  • Updated get() to safely close BufferedReader.
  • Updated post() to safely close OutputStream.

No functional changes were introduced.

Part of #79.

Copilot AI review requested due to automatic review settings March 2, 2026 17:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

2 participants