Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
Jena 2.10.1
-
None
Description
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
@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") ; } }