Description
Here is related code:
try { Response response = client.newCall(r).execute(); if (!response.isSuccessful()) { throw new IllegalArgumentException( String.format("API key: %s is invalid", apiKey)); } } catch(IOException e) { throw new IllegalStateException("Failed contacting Datadog to validate API key", e);
If execute() throws exception, the Response instance would be left unclosed.
Attachments
Issue Links
- links to