[
https://issues.apache.org/jira/browse/JENA-517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13744863#comment-13744863
]
Knut-Olav Hoven commented on JENA-517:
--------------------------------------
Using Jena Core (without jena-arq) to create and export a triples model as
TURTLE.
Creating the model with ModelFactory.createDefaultModel();
N3JenaWriter.chooseWriter() defaults to N3JenaWriterPP, which extends
N3JenaWriterCommon.
"N3JenaWriterCommon.write(Model baseModel, Writer _out, String base)" creates
an instance of N3IndentedWriter.
> Unhandled IOException during model write to OutputStream
> --------------------------------------------------------
>
> Key: JENA-517
> URL: https://issues.apache.org/jira/browse/JENA-517
> Project: Apache Jena
> Issue Type: Bug
> Components: Jena
> Affects Versions: Jena 2.10.1
> Reporter: Knut-Olav Hoven
>
> Method "N3JenaWriterCommon.write()" silently ignores IOException from
> Writer.flush() while writing a model to an OutputStream.
> This might lead to debugging nightmares.
> Should at the very least throw some runtime exception wrapping the original
> exception :)
> {code}
> @Override
> public synchronized void write(Model model, OutputStream output, String
> base)
> {
> try {
> Writer w = new BufferedWriter(new
> OutputStreamWriter(output, "UTF-8")) ;
> write(model, w, base) ;
> try { w.flush() ; } catch (IOException ioEx) {}
> } catch (java.io.UnsupportedEncodingException ex)
> {
> System.err.println("Failed to create UTF-8 writer") ;
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira