[
https://issues.apache.org/jira/browse/AVRO-4176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Oscar Westra van Holthe - Kind updated AVRO-4176:
-------------------------------------------------
Fix Version/s: 1.13.0
1.12.2
> Java parser allows field type to be object with custom type
> -----------------------------------------------------------
>
> Key: AVRO-4176
> URL: https://issues.apache.org/jira/browse/AVRO-4176
> Project: Apache Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.12.0
> Reporter: Andy Coates
> Assignee: Oscar Westra van Holthe - Kind
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.13.0, 1.12.2
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> I _think_ the Java implementation of the parser is allowing an invalid field
> definition to be parsed. The Python parser rejects it.
> For example, consider the following field definition (which would be part of
> the `fields` array in a `record` type):
>
> ```
> {
> {{ "type: {}}
> {{ "type": "SomeCustomType"}}
> }
> {{}}}
> ```
>
> As I understand it, the above is invalid as the outer `type` can be an
> object, but that object must have a `type` that is one of the built in types,
> not a custom type.
> The Java parser does reject double nesting, e.g.
>
> ```
> {
> {{ "type: {}}
> "type": \{ "type": "SomeCustomType" }
> }
> {{}}}
> ```
>
> If I'm correct and these are all invalid, then the issue with the Java Parser
> allowing them is it allows invalid schemas to be published (e.g. to the
> Confluent Schema Registry, written in Java), which other language parsers
> will reject, causing issues with x-platform compatibility.
> Note: I did try to find an existing bug, but being unsure of the search terms
> to use for this, I couldn't find one
--
This message was sent by Atlassian Jira
(v8.20.10#820010)