You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2018/07/23 10:14:02 UTC
[5/5] flink git commit: [FLINK-9805][rest] Catch
JsonProcessingException in RestClient
[FLINK-9805][rest] Catch JsonProcessingException in RestClient
This closes #6307.
This closes #6116.
This closes #6142.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/d850fdec
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/d850fdec
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/d850fdec
Branch: refs/heads/master
Commit: d850fdec9f69d371a49d3fa40a26aee7759376be
Parents: 8d58bf4
Author: zentol <ch...@apache.org>
Authored: Wed Jul 11 15:41:24 2018 +0200
Committer: zentol <ch...@apache.org>
Committed: Mon Jul 23 09:22:50 2018 +0200
----------------------------------------------------------------------
.../src/main/java/org/apache/flink/runtime/rest/RestClient.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/d850fdec/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestClient.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestClient.java b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestClient.java
index a119536..052b9b1 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestClient.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestClient.java
@@ -34,7 +34,6 @@ import org.apache.flink.runtime.rest.util.RestMapperUtils;
import org.apache.flink.util.FlinkException;
import org.apache.flink.util.Preconditions;
-import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.JsonParseException;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.JsonParser;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.JsonProcessingException;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JavaType;
@@ -418,7 +417,7 @@ public class RestClient {
try (InputStream in = new ByteBufInputStream(content)) {
rawResponse = objectMapper.readTree(in);
LOG.debug("Received response {}.", rawResponse);
- } catch (JsonParseException je) {
+ } catch (JsonProcessingException je) {
LOG.error("Response was not valid JSON.", je);
// let's see if it was a plain-text message instead
content.readerIndex(0);