Skip to content

Commit e846be3

Browse files
committed
lint fixes
1 parent b1bb50d commit e846be3

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,23 +251,23 @@ protected internal override Task<TRowSet> GetRowSetAsync(TGetPrimaryKeysResp res
251251
internal override SparkServerType ServerType => SparkServerType.Http;
252252

253253
protected override int ColumnMapIndexOffset => 1;
254-
254+
255255
private string GetUserAgent()
256256
{
257257
// Build the base user agent string with Thrift version
258258
string thriftVersion = GetThriftVersion();
259259
string thriftComponent = string.IsNullOrEmpty(thriftVersion) ? "Thrift" : $"Thrift/{thriftVersion}";
260260
string baseUserAgent = $"{DriverName.Replace(" ", "")}/{ProductVersionDefault} {thriftComponent}";
261-
261+
262262
// Check if a client has provided a user-agent entry
263263
if (Properties.TryGetValue(SparkParameters.UserAgentEntry, out string? userAgentEntry) && !string.IsNullOrWhiteSpace(userAgentEntry))
264264
{
265265
return $"{baseUserAgent} {userAgentEntry}";
266266
}
267-
267+
268268
return baseUserAgent;
269269
}
270-
270+
271271
private string GetThriftVersion()
272272
{
273273
try

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,18 +131,17 @@ private string GetUserAgentFromConnection(Dictionary<string, string> properties)
131131
{
132132
// Create the connection
133133
var connection = new SparkHttpConnection(properties);
134-
134+
135135
// Use reflection to access the private GetUserAgent method
136-
var getUserAgentMethod = typeof(SparkHttpConnection).GetMethod("GetUserAgent",
137-
BindingFlags.NonPublic | BindingFlags.Instance);
138-
136+
var getUserAgentMethod = typeof(SparkHttpConnection).GetMethod("GetUserAgent", BindingFlags.NonPublic | BindingFlags.Instance);
137+
139138
if (getUserAgentMethod == null)
140139
{
141140
throw new InvalidOperationException("GetUserAgent method not found");
142141
}
143-
142+
144143
// Invoke the method
145144
return (string)getUserAgentMethod.Invoke(connection, null)!;
146145
}
147146
}
148-
}
147+
}

0 commit comments

Comments
 (0)