Skip to content
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

Added try-with-resources clause to response body handling #24

Merged
merged 1 commit into from
Sep 18, 2018

Conversation

bruestel
Copy link
Contributor

Prevent warning about leaked connection (' A connection to https://xyz.com/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.
getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);').

@CLAassistant
Copy link

CLAassistant commented Aug 24, 2018

CLA assistant check
All committers have signed the CLA.

@marcelpinto
Copy link
Collaborator

Could you explain why the try would fix that? Shouldn't it have a finally and then close the source?

@marcelpinto
Copy link
Collaborator

Oh I see now that is a try with resources and I guess the body implements autoclose. I was checking it with my mobile and did not see it

@marcelpinto marcelpinto merged commit ca6411a into heremaps:master Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants