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

ASF GitHub Bot updated AVRO-3350:
---------------------------------
    Labels: pull-request-available  (was: )

> 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
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 10m
>  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