CyberSource / CyberSource/cybersource-rest-client-java
ApiClient.java leaks ResponseBody objects
@gnongsie is already working on this.
Since Jun 15, 2019.
- Dominant language
- Java
- Stars
- 29
- Forks
- 50
- Avg merge
- 28m
- Merged PRs (30d)
- 1
Description
hello, if you don't call ResponseBody.close() on your ResponseBody objects you are leaking resources. I've just spent time in the debugger tracing a few runs of the sample DownloadReport.java from your samples repository. ApiClient is clearly not closing the ResponseBody. The only call to close() appears in ApiClient.handleResponse..and it is conditional: only runs if the HTTP status code is 204 (no content ironically). There is a reason ResponseBody implements Closeable. Sorry but no time to contribute code.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.