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

Unclosed Response in DatadogHttpClient#validateApiKey()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.3.0, 1.4.0
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: