Skip to content

Commit

Permalink
PR feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelcfanning committed Dec 1, 2023
1 parent 677d01d commit 59329d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Sarif/EnumeratedArtifact.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public byte[] Bytes
}

// This is our client-side, disk-based file retrieval case.
Stream = FileSystem.FileOpenRead(Uri.LocalPath);
this.Stream = FileSystem.FileOpenRead(Uri.LocalPath);
}

if (Stream.CanSeek)
Expand All @@ -105,7 +105,7 @@ public byte[] Bytes
RetrieveDataFromNonSeekableStream();
}

Stream = null;
this.Stream = null;

return (this.contents, this.bytes);
}
Expand Down
9 changes: 4 additions & 5 deletions src/Sarif/ZipArchiveArtifact.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ public class ZipArchiveArtifact : IEnumeratedArtifact

public ZipArchiveArtifact(ZipArchive archive, ZipArchiveEntry entry, ISet<string> binaryExtensions)
{
this.entry = entry;
this.archive = archive;
this.entry = entry ?? throw new ArgumentNullException(nameof(entry));
this.archive = archive ?? throw new ArgumentNullException(nameof(archive));

this.binaryExtensions = binaryExtensions;
this.uri = new Uri(entry.FullName, UriKind.RelativeOrAbsolute);
}
Expand All @@ -35,9 +36,7 @@ public Stream Stream
{
lock (this.archive)
{
return entry != null
? entry.Open()
: null;
return entry.Open();
}
}
set => throw new NotImplementedException();
Expand Down

0 comments on commit 59329d0

Please sign in to comment.