eolivelli commented on a change in pull request #9551:
URL: https://github.com/apache/pulsar/pull/9551#discussion_r573521447
##########
File path:
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/EnsemblePlacementPolicyConfig.java
##########
@@ -30,6 +31,8 @@
private final Class policyClass;
private final Map<String, Object> properties;
+ private static ObjectMapper mapper = new ObjectMapper();
Review comment:
@merlimat I am not sure I get your point.
AFAIK it is very common to have static fields holding ObjectMapper if you do
not need to change the configuration.
Usually you create one ObjectMapper per class or per group of classes
(internally it holds a cache)
https://stackoverflow.com/questions/3907929/should-i-declare-jacksons-objectmapper-as-a-static-field
----------------------------------------------------------------
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]