Github user pnowojski commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6166#discussion_r195774052
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestClient.java ---
    @@ -292,30 +292,49 @@ private void readRawResponse(FullHttpResponse msg) {
                        ByteBuf content = msg.content();
     
                        JsonNode rawResponse;
    +                   InputStream in = null;
                        try {
    -                           InputStream in = new 
ByteBufInputStream(content);
    +                           in = new ByteBufInputStream(content);
    --- End diff --
    
    couldn't you put this `InputStream` inside try with resource?
    
    ```
    try (InputStream in = new ByteBufInputStream(content)) {
    ...
    }
    ```


---

Reply via email to