Issue #58 Fix HttpClient resource management in ApiTracker.java#79
Merged
Issue #58 Fix HttpClient resource management in ApiTracker.java#79
Conversation
- Replaced static shared HttpClient instance with factory method - Updated fetchFromUrl() to use try-with-resources for proper resource management - Updated fetchUpstreamSources() to use try-with-resources for proper resource management - Ensures HttpClient instances are properly closed after use - Aligns with Java 21+ AutoCloseable best practices The changes ensure that HttpClient resources are properly managed using try-with-resources, preventing potential resource leaks and following Java best practices for AutoCloseable resources. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Added bullet point under 'Leverage Java 21+ features' section - Specifies that try-with-resources must be used for all AutoCloseable resources - Includes examples like HttpClient and streams - Ensures proper resource management following Java best practices 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Updated reference to deleted CODING_STYLE.md file - Changed to indicate this section contains the coding standards directly - Added try-with-resources bullet point under Java 21+ features - Ensures documentation is accurate and complete 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…r comments - Added bullet point prohibiting advertising/promotional content in commit messages - Added bullet point prohibiting 'Co-Authored-By' comments in commit messages - Both guidelines added to Commit Requirements section - Ensures clean, professional commit messages without external advertising - Maintains proper git attribution through standard author fields
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes HttpClient resource management in ApiTracker.java by implementing proper try-with-resources pattern for Java 21+ AutoCloseable support.
Changes:
Tested: Code compiles and API tracker functionality works correctly.
Closes #58