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 2022/04/26 13:55:23 UTC

[GitHub] [pulsar] RobertIndie commented on a diff in pull request #15327: [client]Check consumer schema null in advance

RobertIndie commented on code in PR #15327:
URL: https://github.com/apache/pulsar/pull/15327#discussion_r858739129


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBuilderImpl.java:
##########
@@ -77,6 +77,7 @@ public ConsumerBuilderImpl(PulsarClientImpl client, Schema<T> schema) {
     }
 
     ConsumerBuilderImpl(PulsarClientImpl client, ConsumerConfigurationData<T> conf, Schema<T> schema) {
+        checkArgument(schema != null, "schema should not be null");

Review Comment:
   ```suggestion
           checkArgument(schema != null, "Schema should not be null.");
   ```



##########
pulsar-client/src/test/java/org/apache/pulsar/client/impl/PulsarClientImplTest.java:
##########
@@ -225,6 +226,20 @@ public void testResourceCleanup() throws PulsarClientException {
         }
     }
 
+    @Test
+    public void testConsumerSchemaNull() throws PulsarClientException {
+        @Cleanup

Review Comment:
   This doesn't seem to be part of the PulsarClientImpl test, we should move it to the consumer test.



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org