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

Need validation of infoset data

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.7.0
    • Back End, General
    • None

    Description

      Currently, if you have a xs:hexBinary element that doesn't contain xs:hexBinary in the infoset, we get an InvalidArgumentException:

      java.lang.IllegalArgumentException: Hex character must be 0-9, a-z, or A-Z, but was 'X'
      at edu.illinois.ncsa.daffodil.util.Misc$.hexCharToValue$1(Misc.scala:278)
      at edu.illinois.ncsa.daffodil.util.Misc$.hex2Bytes(Misc.scala:292)
      at edu.illinois.ncsa.daffodil.dpath.NodeInfo$PrimType$HexBinary$.fromXMLString(NodeInfo.scala:526)
      at edu.illinois.ncsa.daffodil.processors.unparsers.InfosetCursorFromXMLReader.createElement(InfosetCursorFromXMLReader.scala:373)
      at edu.illinois.ncsa.daffodil.processors.unparsers.InfosetCursorFromXMLReader.handleStartElement(InfosetCursorFromXMLReader.scala:279)
      at edu.illinois.ncsa.daffodil.processors.unparsers.InfosetCursorFromXMLReader.reallyFill(InfosetCursorFromXMLReader.scala:232)
      at edu.illinois.ncsa.daffodil.processors.unparsers.InfosetCursorFromXMLReader.fill(InfosetCursorFromXMLReader.scala:222)
      at edu.illinois.ncsa.daffodil.util.CursorImplMixin$class.doAdvance(Cursor.scala:189)
      at edu.illinois.ncsa.daffodil.util.CursorImplMixin$class.inspect(Cursor.scala:178)
      ..
      

      We need to fix this, and ensure that all other data formats have proper error handling to report which element in the infoset was invalid.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: