GitHub user shikhar opened a pull request: https://github.com/apache/kafka/pull/1872
KAFKA-4183: centralize checking for optional and default values to avoid bugs Cleaner to just check once for optional & default value from the `convertToConnect()` function. It also helps address an issue with conversions for logical type schemas that have default values and null as the included value. That test case is _probably_ not an issue in practice, since when using the `JsonConverter` to serialize a missing field with a default value, it will serialize the default value for the field. But in the face of JSON data streaming in from a topic being [generous on input, strict on output](http://tedwise.com/2009/05/27/generous-on-input-strict-on-output) seems best. You can merge this pull request into a Git repository by running: $ git pull https://github.com/shikhar/kafka kafka-4183 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1872.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1872 ---- commit 1e09c6431f11361e7f3a5af4c09a8174c3547669 Author: Shikhar Bhushan <shik...@confluent.io> Date: 2016-09-16T23:17:40Z KAFKA-4183: centralize checking for optional and default values to avoid bugs ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---