diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-11-01 14:39:54 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-11-01 14:39:54 +0700 |
commit | 716a491e3ed312da6c80a74e327d62dd4388b11e (patch) | |
tree | 0adabea28431857f372256233ddd4b2e0982190b /crypto/src/openpgp/WrappedGeneratorStream.cs | |
parent | Package with LICENSE.md file (diff) | |
download | BouncyCastle.NET-ed25519-716a491e3ed312da6c80a74e327d62dd4388b11e.tar.xz |
More Span-based Stream methods
Diffstat (limited to 'crypto/src/openpgp/WrappedGeneratorStream.cs')
-rw-r--r-- | crypto/src/openpgp/WrappedGeneratorStream.cs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crypto/src/openpgp/WrappedGeneratorStream.cs b/crypto/src/openpgp/WrappedGeneratorStream.cs index c54ee0b3b..6f96dc9b8 100644 --- a/crypto/src/openpgp/WrappedGeneratorStream.cs +++ b/crypto/src/openpgp/WrappedGeneratorStream.cs @@ -13,10 +13,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp internal WrappedGeneratorStream(IStreamGenerator generator, Stream s) : base(s) { - if (generator == null) - throw new ArgumentNullException(nameof(generator)); - - m_generator = generator; + m_generator = generator ?? throw new ArgumentNullException(nameof(generator)); } protected override void Dispose(bool disposing) |