File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
src/coreclr/System.Private.CoreLib/src/System Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -188,8 +188,7 @@ public static object GetUninitializedObject(
188
188
if ( type is not RuntimeType rt )
189
189
{
190
190
ArgumentNullException . ThrowIfNull ( type ) ;
191
- static void Throw ( Type type ) => throw new SerializationException ( SR . Format ( SR . Serialization_InvalidType , type ) ) ;
192
- Throw ( type ) ;
191
+ throw new SerializationException ( SR . Format ( SR . Serialization_InvalidType , type ) ) ;
193
192
}
194
193
195
194
return rt . GetUninitializedObject ( ) ;
Original file line number Diff line number Diff line change @@ -3886,9 +3886,11 @@ private void CreateInstanceCheckThis()
3886
3886
[ DebuggerHidden ]
3887
3887
internal object GetUninitializedObject ( )
3888
3888
{
3889
- if ( GenericCache is not CreateUninitializedCache cache )
3889
+ object ? genericCache = GenericCache ;
3890
+
3891
+ if ( genericCache is not CreateUninitializedCache cache )
3890
3892
{
3891
- if ( GenericCache is ActivatorCache activatorCache )
3893
+ if ( genericCache is ActivatorCache activatorCache )
3892
3894
{
3893
3895
cache = activatorCache . GetCreateUninitializedCache ( this ) ;
3894
3896
}
You can’t perform that action at this time.
0 commit comments