stevedlawrence opened a new pull request #215: Ensure fragment bytes are 
delivered correctly when dfdl:outputValueCalc is followed by a different 
bitOrder
URL: https://github.com/apache/incubator-daffodil/pull/215
 
 
   When an OVC element is followed by an element with a different bitOrder,
   the OVC causes a suspension and the buffered data output stream will
   have a different bitOrder. Eventually the suspension will be resolved
   and we may need to deliver a fragment byte to the direct data output
   stream. We previously did that with putLong, but that uses the
   FormatInfo from the suspension with the incorrect bitOrder. And
   unfortunately we do not have a FormatInfo associated with the buffered
   data output stream with the correct bitOrder.
   
   To resolve this issue, this patch only uses putLong + FormatInfo when we
   know the bitOrders of the direct and buffered data output streams must
   be the same, i.e. the direct data output stream *does not* end on a byte
   boundary. In this case, the FormatInfo from the suspension has the right
   information, and we can use putLong to handle the complexities for
   combining fragment bytes.
   
   On the other hand, if the direct data output stream *does* end on a byte
   boundary, then the bitOrder could be different, so we can't use putLong
   since the FormatInfo is wrong. But we don't need to--we can just copy
   the fragment byte from buffer to direct since it already ended on a byte
   boundary.
   
   DAFFODIL-2125

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to