Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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.

Assessment

This issue has not been assessed yet.

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.

Dominant language
Java
Stars
29
Forks
50
Avg merge
28m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from CyberSource/cybersource-rest-client-java

All issues in CyberSource/cybersource-rest-client-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.