Skip to content

Commit

Permalink
Fix more analysis warnings
Browse files Browse the repository at this point in the history
Fix warnings from tests.
  • Loading branch information
martincostello committed Mar 14, 2023
1 parent a8f86c6 commit 5478c74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ public MockEcsMetadataEndpoint(string containerJsonPath, string taskJsonPath)
var content = await File.ReadAllTextAsync($"{Environment.CurrentDirectory}/Resources/{containerJsonPath}");
var data = Encoding.UTF8.GetBytes(content);
context.Response.ContentType = "application/json";
await context.Response.Body.WriteAsync(data, 0, data.Length);
await context.Response.Body.WriteAsync(data);
}
else if (context.Request.Method == HttpMethods.Get && context.Request.Path == "/task")
{
var content = await File.ReadAllTextAsync($"{Environment.CurrentDirectory}/Resources/{taskJsonPath}");
var data = Encoding.UTF8.GetBytes(content);
context.Response.ContentType = "application/json";
await context.Response.Body.WriteAsync(data, 0, data.Length);
await context.Response.Body.WriteAsync(data);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ public class TestAWSXRayPropagator
private const string TraceId = "5759e988bd862e3fe1be46a994272793";
private const string ParentId = "53995c3f42cd8ad8";

#if NETFRAMEWORK
private static readonly string[] Empty = new string[0];
#else
private static readonly string[] Empty = Array.Empty<string>();
#endif

private static readonly Func<IDictionary<string, string>, string, IEnumerable<string>> Getter = (headers, name) =>
{
Expand Down

0 comments on commit 5478c74

Please sign in to comment.