[Mulgara-dev] AbstractStreamedAnswer's OutputStreamWriter set to null in four methods

Eric Kobrin ekobrin+mulgara at velocitude.com
Sat Oct 24 22:26:37 UTC 2009


The OutputStreamWriter from
org.mulgara.protocol.AbstractStreamedAnswer is set to null in the
following methods:
   org.mulgara.protocol.AbstractStreamedXMLAnswer.addNamespace(String, URI)
   org.mulgara.protocol.AbstractStreamedXMLAnswer.clearNamespaces()
   org.mulgara.protocol.AbstractStreamedXMLAnswer.setPrettyPrint(boolean)
   org.mulgara.protocol.StreamedSparqlXMLAnswer.useW3CSchema(boolean)

This triggers rebuilding from the underlying stream in the next call
to AbstractStreamedAnswer.emit().

These methods are only called from within the unit tests for the
subclasses of AbstractStreamedXMLAnswer.

This does not seem to be a safe operation and is making the addition
of nested answers (from subqueries) difficult.
In my local branch, I have disabled this behavior, but I would like to
submit a patch for http://mulgara.org/trac/ticket/208

Is there a reason for continuing the present behavior?
If so, I can retain it through some additional work.
If not, I would like to submit the full patch this weekend.

Thank you,
Eric Kobrin
ekobrin at velocitude.com



More information about the Mulgara-dev mailing list