Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.4.0
-
None
-
None
Description
Noticed this while attempting to use the AvroSchemaRegsitry with some complex schema. Boiled down, Avro lets you define a schema such as;
{ "namespace": "org.apache.nifi.testing", "name": "CompositRecord", "type": "record", "fields": [ { "name": "id", "type": "int" }, { "name": "value", "type": "string" }, { "name": "parent", "type": [ "null", "CompositRecord" ] } ] }
The AvroSchemaRegistry (AvroTypeUtil specifically) will fail to parse, and generate a stackoverflow exception.
I've whipped up a fix, tested it out in 1.4.0, and am just running through the contrib build before I submit a patch.