Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions src/ICSharpCode.SharpZipLib/BZip2/BZip2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ public static class BZip2
/// <param name="isStreamOwner">Both streams are closed on completion if true.</param>
public static void Decompress(Stream inStream, Stream outStream, bool isStreamOwner)
{
if (inStream == null || outStream == null)
{
throw new Exception("Null Stream");
}
if (inStream == null)
throw new ArgumentNullException(nameof(inStream));

if (outStream == null)
throw new ArgumentNullException(nameof(outStream));

try
{
Expand Down Expand Up @@ -51,10 +52,11 @@ public static void Decompress(Stream inStream, Stream outStream, bool isStreamOw
/// the lowest compression and 9 the highest.</param>
public static void Compress(Stream inStream, Stream outStream, bool isStreamOwner, int level)
{
if (inStream == null || outStream == null)
{
throw new Exception("Null Stream");
}
if (inStream == null)
throw new ArgumentNullException(nameof(inStream));

if (outStream == null)
throw new ArgumentNullException(nameof(outStream));

try
{
Expand Down