diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-09-02 16:01:46 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-09-02 16:01:46 +0700 |
commit | 0eb75e3c71890e27256b839b58103a8e6cd42e7f (patch) | |
tree | 784c753773f01b01643b9cfc630fb6d16c106edc /crypto/src/cms | |
parent | FIx return value for empty read (diff) | |
download | BouncyCastle.NET-ed25519-0eb75e3c71890e27256b839b58103a8e6cd42e7f.tar.xz |
NullOutputStream => Stream.Null
Diffstat (limited to 'crypto/src/cms')
-rw-r--r-- | crypto/src/cms/CMSSignedDataStreamGenerator.cs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/src/cms/CMSSignedDataStreamGenerator.cs b/crypto/src/cms/CMSSignedDataStreamGenerator.cs index 0dbdccbeb..5587a9d07 100644 --- a/crypto/src/cms/CMSSignedDataStreamGenerator.cs +++ b/crypto/src/cms/CMSSignedDataStreamGenerator.cs @@ -741,9 +741,7 @@ namespace Org.BouncyCastle.Cms private static Stream GetSafeOutputStream(Stream s) { - if (s == null) - return new NullOutputStream(); - return s; + return s ?? Stream.Null; } private static Stream GetSafeTeeOutputStream(Stream s1, Stream s2) |