Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1232

OData V4 : Metadata parsing goes into an infinite loop when JsonToken becomes null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • (Java) V4 4.4.0
    • None
    • odata4-client
    • None

    Description

      When the metadata file looks like
      <?xml version="1.0" encoding="utf-8"?>
      <edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
      <edmx:DataServices>
      <Schema Namespace="caps.products.CatalogService" Alias="caps.products.CatalogService" xmlns="http://docs.oasis-open.org/odata/ns/edm">
      <Annotations Target="caps.products.CatalogService.Products">
      <Annotation Term="UI.LineItem">
      <Collection>
      <Record Type="UI.DataField">
      <PropertyValue Property="Value" Path="image"/>
      <Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High" />
      </Record>
      </Collection>
      </Annotation>
      </Annotations>
      </Schema>
      </edmx:DataServices>
      </edmx:Edmx>
      The jackson parser parses the entire document correctly. All artifacts of edmx object are seen properly but doesn't exit the program. This is happening because the JsonToken is null and this does not indicate the end object.
      This can be solved by using the method hasCurrentToken(). If currentToken is null this evaluates to false.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ramya.vasanth Ramya
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: