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/17 13:14:41 UTC
[GitHub] sijie commented on a change in pull request #3200: [Pulsar-Client]
Extends ConsumerBuilder Validations
sijie commented on a change in pull request #3200: [Pulsar-Client] Extends ConsumerBuilder Validations
URL: https://github.com/apache/pulsar/pull/3200#discussion_r242141064
##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBuilderImpl.java
##########
@@ -172,39 +179,40 @@ public ConsumerBuilderImpl(PulsarClientImpl client, Schema<T> schema) {
}
@Override
- public ConsumerBuilder<T> consumerEventListener(ConsumerEventListener consumerEventListener) {
+ public ConsumerBuilder<T> consumerEventListener(@NonNull ConsumerEventListener consumerEventListener) {
conf.setConsumerEventListener(consumerEventListener);
return this;
}
@Override
- public ConsumerBuilder<T> cryptoKeyReader(CryptoKeyReader cryptoKeyReader) {
+ public ConsumerBuilder<T> cryptoKeyReader(@NonNull CryptoKeyReader cryptoKeyReader) {
conf.setCryptoKeyReader(cryptoKeyReader);
return this;
}
@Override
- public ConsumerBuilder<T> cryptoFailureAction(ConsumerCryptoFailureAction action) {
+ public ConsumerBuilder<T> cryptoFailureAction(@NonNull ConsumerCryptoFailureAction action) {
conf.setCryptoFailureAction(action);
return this;
}
@Override
public ConsumerBuilder<T> receiverQueueSize(int receiverQueueSize) {
- checkArgument(receiverQueueSize >= 0);
+ checkArgument(receiverQueueSize >= 0, "receiverQueueSize needs to be >= 0");
conf.setReceiverQueueSize(receiverQueueSize);
return this;
}
@Override
public ConsumerBuilder<T> acknowledgmentGroupTime(long delay, TimeUnit unit) {
- checkArgument(delay >= 0);
+ checkArgument(delay >= 0, "delay needs to be >= 0");
Review comment:
```suggestion
checkArgument(delay >= 0, "acknowledgmentGroupTime needs to be >= 0");
```
----------------------------------------------------------------
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