[ 
https://issues.apache.org/jira/browse/AVRO-3350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Tzvetanov Grigorov resolved AVRO-3350.
---------------------------------------------
    Fix Version/s: 1.11.1
                   1.12.0
         Assignee: Martin Tzvetanov Grigorov
       Resolution: Fixed

> Validate that Default value is found in Enum
> --------------------------------------------
>
>                 Key: AVRO-3350
>                 URL: https://issues.apache.org/jira/browse/AVRO-3350
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: csharp
>    Affects Versions: 1.11.1
>            Reporter: Kyle Schoonover
>            Assignee: Martin Tzvetanov Grigorov
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.11.1, 1.12.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> {code:java}
> if (null != Default)
> return symbolMap[Default]; {code}
> Could potentially be returning a KeyNotFoundException. It is recommended we 
> validate there is something before returning it.
> {code:java}
> if (Default != null && symbolMap.TryGetValue(Default, out result))
> {
>     return result;
> } {code}
> The issue currently exists in the Ordinal(string symbol) method in EnumSchema



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to