Skip to content

Commit 5af65d9

Browse files
lcheunglciJohnny Pham
andcommitted
Apply suggestions from code review
Co-authored-by: Johnny Pham <[email protected]>
1 parent 8eb5e7d commit 5af65d9

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDependencyListener.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -690,10 +690,7 @@ private void Restart(object unused)
690690
}
691691
finally
692692
{
693-
if (null != context)
694-
{
695-
context.Undo();
696-
}
693+
context?.Undo();
697694
}
698695
}
699696
else
@@ -1033,10 +1030,7 @@ private void TearDownAndDispose()
10331030
_con.Dispose(); // Close and dispose connection.
10341031
#if NETFRAMEWORK
10351032
//dispose windows identity
1036-
if (_windowsIdentity != null)
1037-
{
1038-
_windowsIdentity.Dispose();
1039-
}
1033+
_windowsIdentity?.Dispose();
10401034
#endif
10411035
}
10421036
}

0 commit comments

Comments
 (0)