-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[AVRO-4137, C#]: SpecificWriter Enum Name Matching #3388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -139,7 +139,7 @@ | |||||||||
| return obj is ISpecificRecord && | ||||||||||
| ((obj as ISpecificRecord).Schema as RecordSchema).SchemaName.Equals((sc as RecordSchema).SchemaName); | ||||||||||
| case Schema.Type.Enumeration: | ||||||||||
| return obj.GetType().IsEnum && (sc as EnumSchema).Symbols.Contains(obj.ToString()); | ||||||||||
| return obj.GetType().IsEnum && (sc as EnumSchema).Symbols.Contains(obj.ToString()) && sc.Name.Equals(obj.GetType().Name); | ||||||||||
|
||||||||||
| return obj.GetType().IsEnum && (sc as EnumSchema).Symbols.Contains(obj.ToString()) && sc.Name.Equals(obj.GetType().Name); | |
| return obj.GetType().IsEnum | |
| && (sc as EnumSchema).Symbols.Contains(obj.ToString()) | |
| && (sc as EnumSchema).SchemaName.Equals(obj.GetType()); |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -209,7 +209,7 @@ | |||||||
| return obj is ISpecificRecord && | ||||||||
| ((obj as ISpecificRecord).Schema as RecordSchema).SchemaName.Equals((sc as RecordSchema).SchemaName); | ||||||||
| case Schema.Type.Enumeration: | ||||||||
| return obj.GetType().IsEnum && (sc as EnumSchema).Symbols.Contains(obj.ToString()); | ||||||||
| return obj.GetType().IsEnum && (sc as EnumSchema).Symbols.Contains(obj.ToString()) && sc.Name.Equals(obj.GetType().Name); | ||||||||
Check warningCode scanning / CodeQL Dereferenced variable may be null Warning
Variable
obj Error loading related location Loading this Error loading related location Loading Variable obj Error loading related location Loading this Error loading related location Loading
|
||||||||
| return obj.GetType().IsEnum && (sc as EnumSchema).Symbols.Contains(obj.ToString()) && sc.Name.Equals(obj.GetType().Name); | |
| return obj.GetType().IsEnum && (sc as EnumSchema).Symbols.Contains(obj.ToString()) && | |
| ((sc as EnumSchema).SchemaName.Equals(obj.GetType().FullName)); |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning