CyberSource / CyberSource/cybersource-rest-client-java

ApiClient.java leaks ResponseBody objects

Open
#21 5 comments 3 reactions 1 assignee View on GitHub

@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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.