[ 
https://issues.apache.org/jira/browse/AVRO-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17823118#comment-17823118
 ] 

Clemens Vasters commented on AVRO-3953:
---------------------------------------

Proposing fix in https://github.com/apache/avro/pull/2783

> C# CodeGen.cs:503 incorrectly throws for "reserved keywords"
> ------------------------------------------------------------
>
>                 Key: AVRO-3953
>                 URL: https://issues.apache.org/jira/browse/AVRO-3953
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: csharp
>    Affects Versions: 1.11.3
>         Environment: Any use of the C# generator with enums that contain 
> reserved keywords
>            Reporter: Clemens Vasters
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The C# CodeGen.cs incorrectly chooses to throw when it encounters a C# 
> reserved keyword as an enum member. 
> In C#, any identifier that clashes with a reserved keyword can be escaped 
> with a leading '@', e.g. this works:
> enum Foo
> {
>     @string = 1,
>     @int = 2,
>     @float = 3
> }
> This is a pretty serious issue with any Avro schema that describes 
> programming-related structures. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to