Skip to content

Commit 3590c51

Browse files
committed
Use null coalescing.
1 parent a9b4391 commit 3590c51

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/MySqlConnector/Core/ServerSession.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,13 +1065,13 @@ private void VerifyState(State state1, State state2, State state3)
10651065
}
10661066
}
10671067

1068-
internal bool SslIsEncrypted => m_sslStream != null && m_sslStream.IsEncrypted;
1068+
internal bool SslIsEncrypted => m_sslStream?.IsEncrypted ?? false;
10691069

1070-
internal bool SslIsSigned => m_sslStream != null && m_sslStream.IsSigned;
1070+
internal bool SslIsSigned => m_sslStream?.IsSigned ?? false;
10711071

1072-
internal bool SslIsAuthenticated => m_sslStream != null && m_sslStream.IsAuthenticated;
1072+
internal bool SslIsAuthenticated => m_sslStream?.IsAuthenticated ?? false;
10731073

1074-
internal bool SslIsMutuallyAuthenticated => m_sslStream != null && m_sslStream.IsMutuallyAuthenticated;
1074+
internal bool SslIsMutuallyAuthenticated => m_sslStream?.IsMutuallyAuthenticated ?? false;
10751075

10761076
private byte[] CreateConnectionAttributes()
10771077
{

0 commit comments

Comments
 (0)