You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2020/06/03 02:25:31 UTC
[kylin] branch 2.5.x updated: KYLIN-4543 Remove the usage for
jackson enableDefaultTyping()
This is an automated email from the ASF dual-hosted git repository.
shaofengshi pushed a commit to branch 2.5.x
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/2.5.x by this push:
new ea7b55b KYLIN-4543 Remove the usage for jackson enableDefaultTyping()
ea7b55b is described below
commit ea7b55b3f47b7cceb2af6acd351614037a5b76e3
Author: shaofengshi <sh...@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