Skip to content

Commit 74b8b6f

Browse files
authored
Remove deference of null's stub (#1207)
There would be deference of null because stub is null
1 parent f4db4af commit 74b8b6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/protobuf-net/Internal/Serializers/RepeatedDecorator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ internal static class RepeatedDecorator
1010
{
1111
public static IRuntimeProtoSerializerNode Create(RepeatedSerializerStub stub, int fieldNumber, SerializerFeatures features, CompatibilityLevel compatibilityLevel, DataFormat dataFormat)
1212
{
13-
if (stub is null) ThrowHelper.ThrowArgumentNullException(nameof(stub), $"No suitable repeated serializer resolved for {stub.ForType.NormalizeName()}");
13+
if (stub is null) ThrowHelper.ThrowArgumentNullException(nameof(stub), $"No suitable repeated serializer resolved for stub");
1414
_ = stub.Serializer; // primes and validates
1515
return (IRuntimeProtoSerializerNode)Activator.CreateInstance(typeof(RepeatedDecorator<,>).MakeGenericType(stub.ForType, stub.ItemType),
1616
new object[] { fieldNumber, features, compatibilityLevel, dataFormat, stub });
@@ -95,4 +95,4 @@ public void EmitWrite(CompilerContext ctx, Local valueFrom)
9595
ctx.EmitCall(method);
9696
}
9797
}
98-
}
98+
}

0 commit comments

Comments
 (0)