Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-1595

Check for data too long for specified length - missing

XMLWordPrintableJSON

      Due to the out-of-order way that dfdl:outputValueCalc has to work, the way unparsers compute how long data is, that had to change.

      That results in the means by which the unparsers measure and detect that the data is too long, need to be different.

      Now, there used to be code in unparser primitives that did this checking, but such code can't work in general anymore.

      The place that has to do this checking now is centralized into the RightFill(simple types) and ElementUnused(complex type) unparsers. However, this check isn't implemented there.

      No tests fail, so either there aren't tests exercising this, or the ones that are exercising this just happen to run because they do not also exercise dfdl:outputValueCalc, so nothing out-of-order is happening, and so the older checking code is maybe still working in those specific cases?

      So two things (a) checking code needs to be added to RightFillUnparser and ElementUnusedUnparser to detect when data that cannot be truncated is being unparsed into a specified length that is too small for it (b) tests that create errors due to data too long need to be created which also use aspects of the unparser that force the DirectOrBufferedDatatOutputStream to be used underneath, so as to force this error to be detected.

      Part of (a) is removing the legacy checking code which is not general enough to work now, from the few unparser primitives where it appears (might be only one?)

              Unassigned Unassigned
              mbeckerle.dfdl Mike Beckerle
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: