Skip to content

Commit e059332

Browse files
committed
fix null reference warnings in Benchmarks
seems like the warnings were (somehow) disabled here before and were fixed by the previous TargetFrameworkIdentifier change.
1 parent 076ede1 commit e059332

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

test/Renci.SshNet.Benchmarks/Common/HostKeyEventArgsBenchmarks.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ private static KeyHostAlgorithm GetKeyHostAlgorithm()
1919
{
2020
using (var s = typeof(HostKeyEventArgsBenchmarks).Assembly.GetManifestResourceStream("Renci.SshNet.Benchmarks.Data.Key.RSA.txt"))
2121
{
22-
var privateKey = new PrivateKeyFile(s);
22+
var privateKey = new PrivateKeyFile(s!);
2323
return (KeyHostAlgorithm)privateKey.HostKeyAlgorithms.First();
2424
}
2525
}

test/Renci.SshNet.Benchmarks/Security/Cryptography/ED25519DigitalSignatureBenchmarks.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public ED25519DigitalSignatureBenchmarks()
2121

2222
using (var s = typeof(ED25519DigitalSignatureBenchmarks).Assembly.GetManifestResourceStream("Renci.SshNet.Benchmarks.Data.Key.OPENSSH.ED25519.txt"))
2323
{
24-
_key = (ED25519Key)new PrivateKeyFile(s).Key;
24+
_key = (ED25519Key)new PrivateKeyFile(s!).Key;
2525
}
2626
_signature = new ED25519DigitalSignature(_key).Sign(_data);
2727
}

test/Renci.SshNet.Benchmarks/Security/Cryptography/RsaDigitalSignatureBenchmarks.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public RsaDigitalSignatureBenchmarks()
2323

2424
using (var s = typeof(RsaDigitalSignatureBenchmarks).Assembly.GetManifestResourceStream("Renci.SshNet.Benchmarks.Data.Key.OPENSSH.RSA.txt"))
2525
{
26-
_key = (RsaKey)new PrivateKeyFile(s).Key;
26+
_key = (RsaKey)new PrivateKeyFile(s!).Key;
2727
}
2828
_signature = new RsaDigitalSignature(_key, HashAlgorithmName.SHA256).Sign(_data);
2929
}

0 commit comments

Comments
 (0)