You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Chesnay Schepler (JIRA)" <ji...@apache.org> on 2017/05/13 15:39:04 UTC

[jira] [Assigned] (FLINK-6530) Unclosed Response in DatadogHttpClient#validateApiKey()

     [ https://issues.apache.org/jira/browse/FLINK-6530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chesnay Schepler reassigned FLINK-6530:
---------------------------------------

    Assignee: Chesnay Schepler

> Unclosed Response in DatadogHttpClient#validateApiKey()
> -------------------------------------------------------
>
>                 Key: FLINK-6530
>                 URL: https://issues.apache.org/jira/browse/FLINK-6530
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Chesnay Schepler
>            Priority: Minor
>
> Here is related code:
> {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);
> {code}
> If execute() throws exception, the Response instance would be left unclosed.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)