cbornet commented on code in PR #19160:
URL: https://github.com/apache/pulsar/pull/19160#discussion_r1068150057


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/resources/LocalPoliciesResources.java:
##########
@@ -66,7 +66,7 @@ public 
CompletableFuture<Optional<CacheGetResult<LocalPolicies>>> getLocalPolici
     public CompletableFuture<Void> setLocalPoliciesWithVersion(NamespaceName 
ns, LocalPolicies policies,
                                                                Optional<Long> 
version) {
         try {
-            byte[] content = 
ObjectMapperFactory.getThreadLocal().writeValueAsBytes(policies);
+            byte[] content = 
ObjectMapperFactory.getMapper().writer().writeValueAsBytes(policies);

Review Comment:
   How about having `ObjectMapperFactory.getWriter()` and 
`ObjectMapperFactory.getReader()` methods ?



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to