yanivru commented on a change in pull request #1597:
URL: https://github.com/apache/avro/pull/1597#discussion_r830683481
##########
File path: lang/csharp/src/apache/main/Schema/RecordSchema.cs
##########
@@ -28,10 +29,28 @@ namespace Avro
/// </summary>
public class RecordSchema : NamedSchema
{
+ private List<Field> fields;
+
/// <summary>
/// List of fields in the record
/// </summary>
- public List<Field> Fields { get; private set; }
+ public List<Field> Fields
+ {
+ get
+ {
+ return fields;
+ }
+
+ set
+ {
+ VerifyFieldsPositions(value);
Review comment:
Yes, exception can be avoided in this case. Now the setter clones the
fields and sets the 'pos' value of the fields.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]