Skip to content

Commit 35dc2a4

Browse files
committed
Fix nullable reference type warnings
1 parent 2840321 commit 35dc2a4

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

csharp/src/Drivers/Apache/Spark/SparkHttpConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ protected internal override Task<TRowSet> GetRowSetAsync(TGetPrimaryKeysResp res
256256
private string GetUserAgent()
257257
{
258258
// Check if a client has provided a user-agent entry
259-
if (Properties.TryGetValue(SparkParameters.UserAgentEntry, out string userAgentEntry) && !string.IsNullOrWhiteSpace(userAgentEntry))
259+
if (Properties.TryGetValue(SparkParameters.UserAgentEntry, out string? userAgentEntry) && !string.IsNullOrWhiteSpace(userAgentEntry))
260260
{
261261
return $"{s_baseUserAgent} {userAgentEntry}";
262262
}

csharp/test/Drivers/Apache/Spark/SparkHttpConnectionUserAgentTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private string GetUserAgentFromConnection(Dictionary<string, string> properties)
123123
}
124124

125125
// Invoke the method
126-
return (string)getUserAgentMethod.Invoke(connection, null);
126+
return (string)getUserAgentMethod.Invoke(connection, null)!;
127127
}
128128
}
129129
}

0 commit comments

Comments
 (0)