suneet-s commented on a change in pull request #11078:
URL: https://github.com/apache/druid/pull/11078#discussion_r609137946



##########
File path: 
core/src/main/java/org/apache/druid/common/config/JacksonConfigManager.java
##########
@@ -50,6 +52,7 @@ public JacksonConfigManager(
     this.configManager = configManager;
     this.jsonMapper = jsonMapper;
     this.auditManager = auditManager;
+    this.jsonMapperSkipNull = 
jsonMapper.copy().setSerializationInclusion(JsonInclude.Include.NON_NULL);

Review comment:
       I think this object should be bound in the `JacksonModule` as a 
singleton.
   
   Even though JacksonConfigManager is a singleton, if this binding changes in 
the future, we could inadvertently create an ObjectMapper per 
JacksonConfigManager instead of a singleton that can be shared across the 
process.
   
   ~~Otherwise, each time we create a new JacksonConfigMapper, we will create a 
new ObjectMapper, even though, jsonMapper is a singleton.~~




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to