gharris1727 commented on code in PR #16161:
URL: https://github.com/apache/kafka/pull/16161#discussion_r1626571296


##########
connect/api/src/main/java/org/apache/kafka/connect/data/ConnectSchema.java:
##########
@@ -251,19 +251,30 @@ public static void validateValue(String name, Schema 
schema, Object value) {
                 break;
             case ARRAY:
                 List<?> array = (List<?>) value;
-                for (Object entry : array)
-                    validateValue(schema.valueSchema(), entry);
+                Schema arrayValueSchema = assertSchemaNotNull(name, 
"elements", schema.valueSchema());
+                for (Object entry : array) {
+                    validateValue("entry", arrayValueSchema, entry);

Review Comment:
   I agree that the field name sucks here. I don't think that justifies keeping 
the old behavior, especially where `field "null"` appears in the exception :)
   
   I've implemented your suggestion with a new validateValue method, so that 
existing external callers passing a field name will keep the existing quoting.



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to