From d73dfd3a1d6aad5ba7b7edaeef1cbd69110c990a Mon Sep 17 00:00:00 2001 From: Bharat Kumar Bellamkonda Date: Wed, 16 Oct 2019 22:06:16 +0530 Subject: [PATCH] Replaced >= with > in condition. (#14825) --- .../Mvc.DataAnnotations/src/DataAnnotationsMetadataProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsMetadataProvider.cs b/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsMetadataProvider.cs index 0e975e697f..956f585a75 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsMetadataProvider.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsMetadataProvider.cs @@ -481,7 +481,7 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations // See: https://github.com/dotnet/roslyn/blob/master/docs/features/nullable-reference-types.md#annotations if (nullableAttribute.GetType().GetField(NullableFlagsFieldName) is FieldInfo field && field.GetValue(nullableAttribute) is byte[] flags && - flags.Length >= 0 && + flags.Length > 0 && flags[0] == 1) // First element is the property/parameter type. { isNullable = true;