[ https://issues.apache.org/jira/browse/AVRO-104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747213#action_12747213 ]
Eelco Hillenius commented on AVRO-104: -------------------------------------- > Sure, one might make ReflectDatumReader and ReflectDatumWriter each contain a > ReflectData instance, and add protected methods that create the schemas for > each Java type. I've looked at supplying a patch that does this, but thanks to the contagious nature of static calls, it would require quite a bit of refactoring. For instance, ReflectRequestor, ReflectResponder and SpecificRequestor getClient methods would need to be made non-static for this to work, and those classes plus ReflectDatumReader/ Writer would need to have the ReflectData instance passed in, since it would be used right away in the constructor, which makes implementing it through a protected (overridable) method (like newReflectData()) dangerous as the object is still being constructed. So it seems that the patch I supply here is the least intrusive, and though not particularly elegant, probably better than the alternative, unless you don't mind breaking a bunch of clients. > Reflective API can't handle nulls > --------------------------------- > > Key: AVRO-104 > URL: https://issues.apache.org/jira/browse/AVRO-104 > Project: Avro > Issue Type: Bug > Components: java > Affects Versions: 1.0.0, 1.0.1 > Reporter: Eelco Hillenius > Fix For: 1.0.1 > > Attachments: AVRO-104.patch, AVRO-104.patch, AVRO-104.patch, > AVRO-104.patch > > > It is currently not possible to have fields with null values when using the > reflective API. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.