From 4f16d6e5e7244d6a46daff3702f64cf357c45ce4 Mon Sep 17 00:00:00 2001 From: Sam Xu Date: Mon, 23 Sep 2024 11:23:49 -0700 Subject: [PATCH] Address the comments --- .../Json/ODataJsonResourceDeserializer.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.OData.Core/Json/ODataJsonResourceDeserializer.cs b/src/Microsoft.OData.Core/Json/ODataJsonResourceDeserializer.cs index 792e035df2..97e0ea73f5 100644 --- a/src/Microsoft.OData.Core/Json/ODataJsonResourceDeserializer.cs +++ b/src/Microsoft.OData.Core/Json/ODataJsonResourceDeserializer.cs @@ -101,8 +101,8 @@ internal void ReadResourceTypeName(IODataJsonReaderResourceState resourceState) this.AssertJsonCondition(JsonNodeType.Property, JsonNodeType.EndObject); object value; - if (this.JsonReader.TryGetValueFromBuffered(ODataJsonConstants.PrefixedODataTypePropertyName, true, out value) || - this.JsonReader.TryGetValueFromBuffered(ODataJsonConstants.SimplifiedODataTypePropertyName, true, out value)) + if (this.JsonReader.TryGetValueFromBuffered(ODataJsonConstants.PrefixedODataTypePropertyName, removeIfExist: true, out value) || + this.JsonReader.TryGetValueFromBuffered(ODataJsonConstants.SimplifiedODataTypePropertyName, removeIfExist: true, out value)) { resourceState.Resource.TypeName = ReaderUtils.AddEdmPrefixOfTypeName(ReaderUtils.RemovePrefixOfTypeName(value as string)); return; @@ -122,8 +122,6 @@ internal void ReadResourceTypeName(IODataJsonReaderResourceState resourceState) // Read the annotation value. resourceState.Resource.TypeName = this.ReadODataTypeAnnotationValue(); - - // resourceState.TypeAnnotationFound = true; } }