wernerdv commented on code in PR #17541:
URL: https://github.com/apache/kafka/pull/17541#discussion_r1806587849


##########
connect/api/src/test/java/org/apache/kafka/connect/data/ValuesTest.java:
##########
@@ -1209,7 +1209,7 @@ protected SchemaAndValue roundTrip(Schema desiredSchema, 
String currentValue) {
     }
 
     protected SchemaAndValue roundTrip(Schema desiredSchema, SchemaAndValue 
input) {
-        String serialized = Values.convertToString(input.schema(), 
input.value());
+        String serialized = input != null ? 
Values.convertToString(input.schema(), input.value()) : null;

Review Comment:
   First, the methods `input.schema()` and `input.value()` are called. The line 
below checks if `input` is null.
   
   If `input` is null, calling the methods `input.schema()/value()` will result 
in a NPE.



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