lhotari commented on code in PR #22464:
URL: https://github.com/apache/pulsar/pull/22464#discussion_r1557601182


##########
pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/PulsarAdminBuilderImpl.java:
##########
@@ -54,13 +55,24 @@ private PulsarAdminBuilderImpl(ClientConfigurationData 
conf) {
 
     @Override
     public PulsarAdminBuilder clone() {
-        return new PulsarAdminBuilderImpl(conf.clone());
+        PulsarAdminBuilderImpl pulsarAdminBuilder = new 
PulsarAdminBuilderImpl(conf.clone());
+        pulsarAdminBuilder.clientBuilderClassLoader = clientBuilderClassLoader;
+        pulsarAdminBuilder.acceptGzipCompression = acceptGzipCompression;
+        return pulsarAdminBuilder;
     }
 
     @Override
     public PulsarAdminBuilder loadConf(Map<String, Object> config) {
         conf = ConfigurationDataUtils.loadData(config, conf, 
ClientConfigurationData.class);
         setAuthenticationFromPropsIfAvailable(conf);
+        if (config.containsKey("acceptGzipCompression")) {
+            Object acceptGzipCompressionObj = 
config.get("acceptGzipCompression");
+            if (acceptGzipCompressionObj instanceof Boolean) {

Review Comment:
   @nodece no need to shield against null since there's already `containsKey` 
check. explicitly putting a `null` value in the config wouldn't make any sense. 
That's why I think it's better to let the code throw NullPointerException in 
that case. 



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