This is an automated email from the ASF dual-hosted git repository.

shaofengshi pushed a commit to branch 2.4.x
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/2.4.x by this push:
     new 3e0472d  KYLIN-4543 Remove the usage for jackson enableDefaultTyping()
3e0472d is described below

commit 3e0472d12bddadfcd5fbea4b1ca4c6fc0e9291a6
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 21bc8f1..8064236 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
@@ -41,12 +41,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)
@@ -89,10 +87,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);
@@ -114,8 +108,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

Reply via email to