Michael Beckerle created DAFFODIL-1871:
------------------------------------------
Summary: XMLTextInfosetOutputter endDocument should flush the
writer
Key: DAFFODIL-1871
URL: https://issues.apache.org/jira/browse/DAFFODIL-1871
Project: Daffodil
Issue Type: Bug
Components: API, Back End
Affects Versions: 2.0.0
Reporter: Michael Beckerle
Fix For: 2.1.0
This an API issue.
Since XMLTextInfosetOutputter doesn't have a flush() method of its own, then it
needs to perform a flush() of the java.io.Writer that it is writing to,
automatically.
I would suggest that on endDocument it should do a flush(). One can argue it
should flush as part of endElement for complex elements as well, but at least
on endDocument.
The absence of this flush() behavior caused one JAPI developer using Daffodil
to waste time mystified about why she was getting 1/2 of an XML document out.
Changing her code to just flush the writer after the return from parse() fixed
it, but I think the API design really has to either flush automatically (my
preference), or the XMLTextInfosetOutputter should have a flush() method of its
own which flushes any state it has (today there is none), then flushes the
writer it surrounds.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)