Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-72

TSVInput infinite loop and optional binding values not handled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Done
    • None
    • Jena 2.11.0
    • ARQ

    Description

      TSVInput that has been proposed in JENA-69 contains two bugs:

      1) When you attempt to read an empty ResultSet (i.e. a ResultSet that contain no binding) the code will enter in an infinite loop. This issue is really simple to solve.

      2) Optional binding values are not supported, especially with the following ResultSet:

      (resultset (?a ?b ?c)
      (row (?a 1) (?c 4))
      (row (?a 1) (?b 2) (?c 3)))

      it will be serialized as:

      a....b....c
      1..........4
      1....2....3

      When we call tokenizer.next(), we get the next token. The problem is that we are not aware that the tokenizer has consumed two separators (\t), and we cannot detect that the value 4 is associated to the variable c.

      Any idea to handle it?

      Attachments

        1. JENA-72_ARQ_r1136132.patch
          4 kB
          Paolo Castagna

        Issue Links

          Activity

            People

              castagna Paolo Castagna
              laurent.pellegrino Laurent Pellegrino
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: