Jason918 commented on a change in pull request #12706:
URL: https://github.com/apache/pulsar/pull/12706#discussion_r746197291



##########
File path: 
pulsar-broker/src/test/java/org/apache/pulsar/client/api/InterceptorsTest.java
##########
@@ -151,12 +151,12 @@ public void close() {
 
             @Override
             public Message<String> beforeSend(Producer<String> producer, 
Message<String> message) {
-                throw new NullPointerException();
+                throw new IllegalArgumentException();

Review comment:
       Maybe NotImplementException is better?

##########
File path: 
pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/PrimitiveSchemaTest.java
##########
@@ -124,7 +124,7 @@ public void allSchemasShouldSupportNull(Map<Schema, 
List<Object>> testData) {
                 assertNull(((AbstractSchema) schema).decode(byteBuf),
                     "Should support null in " + 
schema.getSchemaInfo().getName() + " deserialization");
             } catch (NullPointerException npe) {
-                throw new NullPointerException("NPE when using schema " + 
schema + " : " + npe.getMessage());
+                throw new IllegalArgumentException("NPE when using schema " + 
schema + " : " + npe.getMessage(), npe);

Review comment:
       Why change NullPointerException to IllegalArgumentException here?




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