[ https://issues.apache.org/jira/browse/KAFKA-2695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15099141#comment-15099141 ]
Jason Gustafson commented on KAFKA-2695: ---------------------------------------- After looking at this, I feel uneasy about the risk of allowing nulls to suddenly pop up all over the place. Perhaps instead of modifying Type.STRING and Type.BYTES (and verifying that all usages are safe for null values), we can create NULLABLE_STRING and NULLABLE_BYTES Type implementations which must be used explicitly in schema definitions to allow null fields. Then we use these for the user data field in the consumer protocol to fix [~edenhill]'s issue. > Handle null string/bytes protocol primitives > -------------------------------------------- > > Key: KAFKA-2695 > URL: https://issues.apache.org/jira/browse/KAFKA-2695 > Project: Kafka > Issue Type: Bug > Reporter: Jason Gustafson > Assignee: Jason Gustafson > > The kafka protocol supports null bytes and string primitives by passing -1 as > the size, but the current deserializers implemented in > o.a.k.common.protocol.types.Type do not handle them. -- This message was sent by Atlassian JIRA (v6.3.4#6332)