summary refs log tree commit diff
path: root/crypto/src/asn1/gm
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/gm')
-rw-r--r--crypto/src/asn1/gm/GMNamedCurves.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/asn1/gm/GMNamedCurves.cs b/crypto/src/asn1/gm/GMNamedCurves.cs
index fec0c1401..764b031ed 100644
--- a/crypto/src/asn1/gm/GMNamedCurves.cs
+++ b/crypto/src/asn1/gm/GMNamedCurves.cs
@@ -147,21 +147,21 @@ namespace Org.BouncyCastle.Asn1.GM
         /// <param name="oid">The <see cref="DerObjectIdentifier">OID</see> for the curve.</param>
         public static X9ECParametersHolder GetByOidLazy(DerObjectIdentifier oid)
         {
-            return curves.TryGetValue(oid, out var holder) ? holder : null;
+            return CollectionUtilities.GetValueOrNull(curves, oid);
         }
 
         /// <summary>Look up the name of the curve with the given <see cref="DerObjectIdentifier">OID</see>.</summary>
         /// <param name="oid">The <see cref="DerObjectIdentifier">OID</see> for the curve.</param>
         public static string GetName(DerObjectIdentifier oid)
         {
-            return names.TryGetValue(oid, out var name) ? name : null;
+            return CollectionUtilities.GetValueOrNull(names, oid);
         }
 
         /// <summary>Look up the <see cref="DerObjectIdentifier">OID</see> of the curve with the given name.</summary>
         /// <param name="name">The name of the curve.</param>
         public static DerObjectIdentifier GetOid(string name)
         {
-            return objIds.TryGetValue(name, out var oid) ? oid : null;
+            return CollectionUtilities.GetValueOrNull(objIds, name);
         }
 
         /// <summary>Enumerate the available curve names in this registry.</summary>