Skip to content

Commit

Permalink
Fix nullability bug in BindingContext (#2646)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughbe authored and RussKie committed Jan 21, 2020
1 parent ad8ff38 commit 18c5349
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ IEnumerator IEnumerable.GetEnumerator()
/// <summary>
/// Gets an object to use for synchronization (thread safety).
/// </summary>
object ICollection.SyncRoot => null;
object ICollection.SyncRoot => this;

/// <summary>
/// Gets the System.Windows.Forms.BindingManagerBase associated with the specified
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void BindingContext_ICollection_GetProperties_ReturnsExpected()
{
ICollection context = new BindingContext();
Assert.False(context.IsSynchronized);
Assert.Null(context.SyncRoot);
Assert.Same(context, context.SyncRoot);
Assert.Empty(context);
}

Expand Down

0 comments on commit 18c5349

Please sign in to comment.