Skip to content

Commit 7364a96

Browse files
committed
Fix: ReadOnlySet is not really read-only
It is possible to update content of read-only set by updating underlying collection. It is expected that some tests will fail because they depend on that behavior.
1 parent ffc8a79 commit 7364a96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NHibernate/Intercept/AbstractFieldInterceptor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protected internal AbstractFieldInterceptor(ISessionImplementor session, ISet<st
3535
this.unwrapProxyFieldNames = unwrapProxyFieldNames ?? new HashSet<string>();
3636
this.entityName = entityName;
3737
this.mappedClass = mappedClass;
38-
this.uninitializedFieldsReadOnly = uninitializedFields != null ? new ReadOnlySet<string>(uninitializedFields) : null;
38+
this.uninitializedFieldsReadOnly = uninitializedFields != null ? new ReadOnlySet<string>(new HashSet<string>(uninitializedFields)) : null;
3939
this.originalUninitializedFields = uninitializedFields != null ? uninitializedFields.ToArray() : null;
4040
}
4141

0 commit comments

Comments
 (0)