Replaced >= with > in condition. (#14825)
This commit is contained in:
parent
8f9073e8ea
commit
d73dfd3a1d
|
|
@ -481,7 +481,7 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations
|
||||||
// See: https://github.com/dotnet/roslyn/blob/master/docs/features/nullable-reference-types.md#annotations
|
// See: https://github.com/dotnet/roslyn/blob/master/docs/features/nullable-reference-types.md#annotations
|
||||||
if (nullableAttribute.GetType().GetField(NullableFlagsFieldName) is FieldInfo field &&
|
if (nullableAttribute.GetType().GetField(NullableFlagsFieldName) is FieldInfo field &&
|
||||||
field.GetValue(nullableAttribute) is byte[] flags &&
|
field.GetValue(nullableAttribute) is byte[] flags &&
|
||||||
flags.Length >= 0 &&
|
flags.Length > 0 &&
|
||||||
flags[0] == 1) // First element is the property/parameter type.
|
flags[0] == 1) // First element is the property/parameter type.
|
||||||
{
|
{
|
||||||
isNullable = true;
|
isNullable = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue