From 9b3f2f786a9b5622440a7c1a60decb687d767b54 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Mon, 22 Nov 2021 00:39:58 +0700 Subject: Use Meta for checked casts --- crypto/src/asn1/DERExternal.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crypto/src') diff --git a/crypto/src/asn1/DERExternal.cs b/crypto/src/asn1/DERExternal.cs index 28d5cc46a..b8987d53e 100644 --- a/crypto/src/asn1/DERExternal.cs +++ b/crypto/src/asn1/DERExternal.cs @@ -246,11 +246,9 @@ namespace Org.BouncyCastle.Asn1 switch (tagNo) { case 1: - //return ASN1OctetString.TYPE.checkedCast(externalContent); - return (Asn1OctetString)externalContent; + return Asn1OctetString.Meta.Instance.CheckedCast(externalContent); case 2: - //return ASN1BitString.TYPE.checkedCast(externalContent); - return (DerBitString)externalContent; + return DerBitString.Meta.Instance.CheckedCast(externalContent); default: return externalContent; } -- cgit 1.5.1