diff options
Diffstat (limited to 'crypto/src/asn1/cmp/PKIFreeText.cs')
-rw-r--r-- | crypto/src/asn1/cmp/PKIFreeText.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/crypto/src/asn1/cmp/PKIFreeText.cs b/crypto/src/asn1/cmp/PKIFreeText.cs index f3a4b8a81..f4d7e0967 100644 --- a/crypto/src/asn1/cmp/PKIFreeText.cs +++ b/crypto/src/asn1/cmp/PKIFreeText.cs @@ -7,13 +7,11 @@ namespace Org.BouncyCastle.Asn1.Cmp { public static PkiFreeText GetInstance(object obj) { + if (obj == null) + return null; if (obj is PkiFreeText pkiFreeText) return pkiFreeText; - - if (obj != null) - return new PkiFreeText(Asn1Sequence.GetInstance(obj)); - - return null; + return new PkiFreeText(Asn1Sequence.GetInstance(obj)); } public static PkiFreeText GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit) @@ -21,7 +19,7 @@ namespace Org.BouncyCastle.Asn1.Cmp return GetInstance(Asn1Sequence.GetInstance(taggedObject, declaredExplicit)); } - internal Asn1Sequence m_strings; + private readonly Asn1Sequence m_strings; internal PkiFreeText(Asn1Sequence seq) { |