Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-2818

Failed assertion when parsing text with negative zero value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.5.0
    • 3.5.0
    • Back End
    • None

    Description

      If a text number parses as negative zero, ICU returns a Double which fails an assertion where we expect only infinity or NaN.

      org.apache.daffodil.lib.exceptions.Abort: Invariant broken: d.isNaN().||(d.isInfinite())
      [error] org.apache.daffodil.lib.exceptions.Assert$.abort(Assert.scala:143)
      [error] org.apache.daffodil.runtime1.processors.parsers.ConvertTextStandardNumberParser.parse(ConvertTextStandardNumberParser.scala:235)
      [error] org.apache.daffodil.runtime1.processors.parsers.Parser.parse1(Parser.scala:153)
      [error] org.apache.daffodil.runtime1.processors.parsers.Parser.parse1$(Parser.scala:147), took 0.089 sec
      

      We need to also allow the edge case where ICU returns a Double for negative zero.

      Attachments

        Activity

          People

            slawrence Steve Lawrence
            slawrence Steve Lawrence
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: