-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Close underlying resources when no timeout is used #178
Conversation
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
Test Results 10 files 10 suites 32s ⏱️ Results for commit 45868ed. ♻️ This comment has been updated with latest results. |
Quality Gate passedIssues Measures |
User description
This PR fixes a special case where the underlying resource was not closed when using zero read timeout and reading the feed using an iterator or a spliterator.
Example:
PR Type
Bug fix, Enhancement, Tests
Description
Cleaner
inAbstractRssReader
to ensure underlying resources are properly closed when no timeout is used.CleaningAction
class to handle the closing ofXMLStreamReader
and other resources.RssItemIterator
to implementAutoCloseable
and utilizeCleaner
for resource management.Cleaner
.Changes walkthrough 📝
AbstractRssReader.java
Implement resource cleanup using Cleaner in AbstractRssReader
src/main/java/com/apptasticsoftware/rssreader/AbstractRssReader.java
Cleaner
to manage resource cleanup.CleaningAction
class to handle resource closing.RssItemIterator
to implementAutoCloseable
.RssReaderIntegrationTest.java
Add tests for resource cleanup and modify existing tests
src/test/java/com/apptasticsoftware/integrationtest/RssReaderIntegrationTest.java
Cleaner
.HttpClient
.