You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/04/21 10:45:01 UTC

[GitHub] [kafka] Iskuskov commented on a change in pull request #9541: KAFKA-10675: Add schema name to ConnectSchema.validateValue() error message

Iskuskov commented on a change in pull request #9541:
URL: https://github.com/apache/kafka/pull/9541#discussion_r617423452



##########
File path: connect/api/src/main/java/org/apache/kafka/connect/data/ConnectSchema.java
##########
@@ -266,7 +267,7 @@ public static void validateValue(String name, Schema schema, Object value) {
     private static List<Class> expectedClassesFor(Schema schema) {
         List<Class> expectedClasses = LOGICAL_TYPE_CLASSES.get(schema.name());
         if (expectedClasses == null)
-            expectedClasses = SCHEMA_TYPE_CLASSES.get(schema.type());
+            expectedClasses = SCHEMA_TYPE_CLASSES.getOrDefault(schema.type(), Collections.emptyList());

Review comment:
       Thank you! Highly appreciate your comment




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

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