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:57 UTC
[4/4] flink git commit: [FLINK-9805][rest] Catch
JsonProcessingException in RestClient
[FLINK-9805][rest] Catch JsonProcessingException in RestClient
This closes #6307.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/3041bd3b
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/3041bd3b
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/3041bd3b
Branch: refs/heads/release-1.5
Commit: 3041bd3b8658a004803617eb0603bf8e459b5173
Parents: 1ec8930
Author: zentol <ch...@apache.org>
Authored: Wed Jul 11 15:41:24 2018 +0200
Committer: zentol <ch...@apache.org>
Committed: Mon Jul 23 09:20:18 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/3041bd3b/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 b75ffbf..3c48135 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;
@@ -409,7 +408,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);