Commit 150e69e
authored
* Issue #58 Fix HttpClient resource management in ApiTracker.java
- 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.
* Add try-with-resources guideline to AGENTS.md
- 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
* Fix AGENTS.md references and add try-with-resources guideline
- 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
* Update AGENTS.md commit guidelines to forbid advertising and co-author 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
1 parent 8b13911 commit 150e69e
File tree
2 files changed
+14
-9
lines changed- json-java21-api-tracker/src/main/java/io/github/simbo1905/tracker
2 files changed
+14
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
223 | 225 | | |
224 | 226 | | |
225 | 227 | | |
| |||
422 | 424 | | |
423 | 425 | | |
424 | 426 | | |
425 | | - | |
| 427 | + | |
426 | 428 | | |
427 | 429 | | |
428 | 430 | | |
| |||
455 | 457 | | |
456 | 458 | | |
457 | 459 | | |
| 460 | + | |
458 | 461 | | |
459 | 462 | | |
460 | 463 | | |
| |||
Lines changed: 10 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
74 | | - | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
81 | | - | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
227 | 229 | | |
228 | 230 | | |
229 | 231 | | |
230 | | - | |
| 232 | + | |
231 | 233 | | |
232 | 234 | | |
233 | 235 | | |
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
237 | | - | |
| 239 | + | |
238 | 240 | | |
239 | 241 | | |
240 | 242 | | |
| |||
0 commit comments