From 2bdab5ba7b1156eabf0e55f6ee6efa9b4203a95f Mon Sep 17 00:00:00 2001 From: Markus Kitsinger Date: Tue, 29 Jan 2019 22:56:32 -0600 Subject: [PATCH] Do not cache error string in SerializationException (#22281) --- .../shared/System/Runtime/Serialization/SerializationException.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/System.Private.CoreLib/shared/System/Runtime/Serialization/SerializationException.cs b/src/System.Private.CoreLib/shared/System/Runtime/Serialization/SerializationException.cs index 92c01ee..172e6c5 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/Serialization/SerializationException.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/Serialization/SerializationException.cs @@ -10,12 +10,10 @@ namespace System.Runtime.Serialization [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class SerializationException : SystemException { - private static string s_nullMessage = SR.SerializationException; - // Creates a new SerializationException with its message // string set to a default message. public SerializationException() - : base(s_nullMessage) + : base(SR.SerializationException) { HResult = HResults.COR_E_SERIALIZATION; } -- 2.7.4