You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2013/08/23 17:37:53 UTC

[jira] [Closed] (JENA-517) Unhandled IOException during model write to OutputStream

     [ https://issues.apache.org/jira/browse/JENA-517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne closed JENA-517.
------------------------------

    
> 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
>            Assignee: Andy Seaborne
>            Priority: Minor
>             Fix For: Jena 2.10.2
>
>
> 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