From f0f8d88cf5bc75d4344c43473b017300cafb4473 Mon Sep 17 00:00:00 2001 From: shi yuhang <52435083+shiyuhang0@users.noreply.github.com> Date: Thu, 14 Nov 2024 15:51:39 +0800 Subject: [PATCH] cp (#2796) --- .../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 9ad28bf5eb..06cd8338eb 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 @@ -18,6 +18,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(); try { + mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); return mapper.readValue(json.toStringUtf8(), cls); } catch (JsonParseException | JsonMappingException e) { String errMsg =