diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-03-06 23:30:06 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-03-06 23:30:06 +0700 |
commit | 52327a7cfef7837f5464f04f1fd681998e7a7ed2 (patch) | |
tree | af263306fca83f48e76bc5e7a0d7aea5ff4779d1 /crypto/src/openpgp/PgpMarker.cs | |
parent | Support leaveOpen in decompressors (diff) | |
download | BouncyCastle.NET-ed25519-52327a7cfef7837f5464f04f1fd681998e7a7ed2.tar.xz |
Refactoring in OpenPgp
Diffstat (limited to 'crypto/src/openpgp/PgpMarker.cs')
-rw-r--r-- | crypto/src/openpgp/PgpMarker.cs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/src/openpgp/PgpMarker.cs b/crypto/src/openpgp/PgpMarker.cs index 7257767ec..fdbc02bc1 100644 --- a/crypto/src/openpgp/PgpMarker.cs +++ b/crypto/src/openpgp/PgpMarker.cs @@ -12,14 +12,13 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp { private readonly MarkerPacket data; - public PgpMarker( - BcpgInputStream bcpgInput) + public PgpMarker(BcpgInputStream bcpgInput) { Packet packet = bcpgInput.ReadPacket(); - if (!(packet is MarkerPacket)) + if (!(packet is MarkerPacket markerPacket)) throw new IOException("unexpected packet in stream: " + packet); - this.data = (MarkerPacket)packet; + this.data = markerPacket; } } } |