Github user pnowojski commented on a diff in the pull request:
https://github.com/apache/flink/pull/6166#discussion_r195774420
--- 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);
rawResponse = objectMapper.readTree(in);
LOG.debug("Received response {}.", rawResponse);
} catch (JsonParseException je) {
LOG.error("Response was not valid JSON.", je);
// let's see if it was a plain-text message
instead
content.readerIndex(0);
+ ByteBufInputStream inputStream = null;
try {
- ByteBufInputStream in = new
ByteBufInputStream(content);
+ inputStream = new
ByteBufInputStream(content);
--- End diff --
ditto?
---