From 94d1dbe553eb4bcdab5f04b8c41dff8d9173fd44 Mon Sep 17 00:00:00 2001 From: yangxin Date: Tue, 25 Apr 2023 17:21:49 +0800 Subject: [PATCH] Disable jackson FAIL_ON_UNKNOWN_PROPERTIES --- .../main/java/com/pingcap/tikv/catalog/CatalogTransaction.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tikv-client/src/main/java/com/pingcap/tikv/catalog/CatalogTransaction.java b/tikv-client/src/main/java/com/pingcap/tikv/catalog/CatalogTransaction.java index 5fff9a7bf0..ca26fb7f12 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/catalog/CatalogTransaction.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/catalog/CatalogTransaction.java @@ -19,6 +19,7 @@ import static com.pingcap.tikv.codec.MetaCodec.KEY_DBs; import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableList; @@ -51,6 +52,7 @@ public static T parseFromJson(ByteString json, Class cls) { logger.debug(String.format("Parse Json %s : %s", cls.getSimpleName(), json.toStringUtf8())); ObjectMapper mapper = new ObjectMapper(); + mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); try { return mapper.readValue(json.toStringUtf8(), cls); } catch (JsonParseException | JsonMappingException e) {