Skip to content

Commit

Permalink
Seal overridden virtual method SetDefaultFallbacks (#100030)
Browse files Browse the repository at this point in the history
  • Loading branch information
xtqqczze authored Jul 1, 2024
1 parent 426b00c commit 9cc0e75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public Latin1Encoding() : base(ISO_8859_1)
public override ReadOnlySpan<byte> Preamble => default;

// Default fallback that we'll use.
internal override void SetDefaultFallbacks()
internal sealed override void SetDefaultFallbacks()
{
// We use best-fit mappings by default when encoding.
encoderFallback = EncoderLatin1BestFitFallback.SingletonInstance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public UTF32Encoding(bool bigEndian, bool byteOrderMark, bool throwOnInvalidChar
SetDefaultFallbacks();
}

internal override void SetDefaultFallbacks()
internal sealed override void SetDefaultFallbacks()
{
// For UTF-X encodings, we use a replacement fallback with an empty string
if (_isThrowException)
Expand Down

0 comments on commit 9cc0e75

Please sign in to comment.