[
https://issues.apache.org/jira/browse/AVRO-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17825940#comment-17825940
]
ASF subversion and git services commented on AVRO-3953:
-------------------------------------------------------
Commit 6f362d5986d20d44694f1e8d8d09410870a4cc26 in avro's branch
refs/heads/dependabot/cargo/lang/rust/env_logger-0.11.3 from Clemens Vasters
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=6f362d598 ]
AVRO-3953: Prefixing enum member identifiers instead of throwing (#2783)
* AVRO-3953
Signed-off-by: Clemens Vasters <[email protected]>
* Unit test added. Removed local check for symbol.
---------
Signed-off-by: Clemens Vasters <[email protected]>
> 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
> Assignee: Zoltan Csizmadia
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.12.0
>
> Time Spent: 1h 20m
> 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)