This is an automated email from the ASF dual-hosted git repository. shaofengshi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/master by this push: new fefd5f6 KYLIN-4543 Remove the usage for jackson enableDefaultTyping() fefd5f6 is described below commit fefd5f6df6a0fdb90cda7a0a66d1aa09d14edbd1 Author: shaofengshi <shaofeng...@apache.org> AuthorDate: Tue Jun 2 22:31:39 2020 +0800 KYLIN-4543 Remove the usage for jackson enableDefaultTyping() --- .../src/main/java/org/apache/kylin/common/util/JsonUtil.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/core-common/src/main/java/org/apache/kylin/common/util/JsonUtil.java b/core-common/src/main/java/org/apache/kylin/common/util/JsonUtil.java index 8cb7f65..1a8e7cc 100644 --- a/core-common/src/main/java/org/apache/kylin/common/util/JsonUtil.java +++ b/core-common/src/main/java/org/apache/kylin/common/util/JsonUtil.java @@ -45,12 +45,10 @@ public class JsonUtil { // reuse the object mapper to save memory footprint private static final ObjectMapper mapper = new ObjectMapper(); private static final ObjectMapper indentMapper = new ObjectMapper(); - private static final ObjectMapper typeMapper = new ObjectMapper(); static { mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); indentMapper.configure(SerializationFeature.INDENT_OUTPUT, true); - typeMapper.enableDefaultTyping(); } public static <T> T readValue(File src, Class<T> valueType) @@ -93,10 +91,6 @@ public class JsonUtil { return mapper.readTree(content); } - public static <T> T readValueWithTyping(InputStream src, Class<T> valueType) throws IOException { - return typeMapper.readValue(src, valueType); - } - public static void writeValueIndent(OutputStream out, Object value) throws IOException, JsonGenerationException, JsonMappingException { indentMapper.writeValue(out, value); @@ -118,8 +112,4 @@ public class JsonUtil { public static String writeValueAsIndentString(Object value) throws JsonProcessingException { return indentMapper.writeValueAsString(value); } - - public static void writeValueWithTyping(OutputStream out, Object value) throws IOException { - typeMapper.writeValue(out, value); - } } \ No newline at end of file