[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/0da30b71
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/0da30b71
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/0da30b71

Branch: refs/heads/release-1.6
Commit: 0da30b7138de2caf1f4f789426b5ffab81664ec4
Parents: b08414b
Author: zentol <ches...@apache.org>
Authored: Wed Jul 11 15:41:24 2018 +0200
Committer: zentol <ches...@apache.org>
Committed: Mon Jul 23 09:20:08 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/0da30b71/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);

Reply via email to