You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2012/10/13 18:26:11 UTC
svn commit: r1397892 -
/jena/trunk/jena-arq/src/main/java/org/openjena/atlas/io/IO.java
Author: andy
Date: Sat Oct 13 16:26:11 2012
New Revision: 1397892
URL: http://svn.apache.org/viewvc?rev=1397892&view=rev
Log:
Add IO.closeSilent, which closes a closeable ignoring any exceptions.
Modified:
jena/trunk/jena-arq/src/main/java/org/openjena/atlas/io/IO.java
Modified: jena/trunk/jena-arq/src/main/java/org/openjena/atlas/io/IO.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/openjena/atlas/io/IO.java?rev=1397892&r1=1397891&r2=1397892&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/openjena/atlas/io/IO.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/openjena/atlas/io/IO.java Sat Oct 13 16:26:11 2012
@@ -141,6 +141,14 @@ public class IO
try { resource.close(); } catch (IOException ex) { exception(ex) ; }
}
+ public static void closeSilent(java.io.Closeable resource)
+ {
+ if ( resource == null )
+ return ;
+ try { resource.close(); } catch (IOException ex) { }
+ }
+
+
public static void exception(IOException ex)
{
throw new AtlasException(ex) ;