You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/12/15 14:40:34 UTC

[GitHub] erenavsarogullari commented on a change in pull request #3193: [Pulsar-Client] Extends ProducerBuilder Validations

erenavsarogullari commented on a change in pull request #3193: [Pulsar-Client] Extends ProducerBuilder Validations
URL: https://github.com/apache/pulsar/pull/3193#discussion_r241951337
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerBuilderImpl.java
 ##########
 @@ -228,13 +230,16 @@ private ProducerBuilderImpl(PulsarClientImpl client, ProducerConfigurationData c
     }
 
     @Override
-    public ProducerBuilder<T> property(@NonNull String key, @NonNull String value) {
+    public ProducerBuilder<T> property(String key, String value) {
+        checkArgument(StringUtils.isNotBlank(key), "property key cannot be blank");
         conf.getProperties().put(key, value);
         return this;
     }
 
     @Override
     public ProducerBuilder<T> properties(@NonNull Map<String, String> properties) {
+        properties.keySet().forEach(key ->
 
 Review comment:
   yep, it already has `@NonNull` protection. Also, new UT has been added as `testProducerBuilderImplWhenPropertiesIsNull`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services