Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-6530

Unclosed Response in DatadogHttpClient#validateApiKey()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0, 1.4.0
    • Component/s: None
    • Labels:
      None

      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

            Activity

              People

              • Assignee:
                Zentol Chesnay Schepler
                Reporter:
                yuzhihong@gmail.com Ted Yu
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: