You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Stan Rosenberg (JIRA)" <ji...@apache.org> on 2019/07/21 04:03:00 UTC

[jira] [Created] (AVRO-2478) RecordBuilderBase.validate doesn't check nullability of composite types

Stan Rosenberg created AVRO-2478:
------------------------------------

             Summary: RecordBuilderBase.validate doesn't check nullability of composite types
                 Key: AVRO-2478
                 URL: https://issues.apache.org/jira/browse/AVRO-2478
             Project: Apache Avro
          Issue Type: Bug
          Components: java
    Affects Versions: 1.8.2, 1.9.0
            Reporter: Stan Rosenberg


Builder classes generated from record.vm make use of RecordBuilderBase.validate in every setter to ensure that the passed value (primitive or composite) is compatible with the nullability of the corresponding Avro schema type.  The problem is the validation doesn't extend to composite types, namely Maps and Arrays.  This breaks the invariant that any record constructed via Builder is well-defined (i.e., can be serialized).



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)