geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r705707 - /geronimo/gshell/trunk/gshell-support/gshell-xstore/src/main/java/org/apache/geronimo/gshell/xstore/XStoreRecordImpl.java
Date Fri, 17 Oct 2008 18:56:46 GMT
Author: jdillon
Date: Fri Oct 17 11:56:45 2008
New Revision: 705707

URL: http://svn.apache.org/viewvc?rev=705707&view=rev
Log:
Use the Closer

Modified:
    geronimo/gshell/trunk/gshell-support/gshell-xstore/src/main/java/org/apache/geronimo/gshell/xstore/XStoreRecordImpl.java

Modified: geronimo/gshell/trunk/gshell-support/gshell-xstore/src/main/java/org/apache/geronimo/gshell/xstore/XStoreRecordImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-xstore/src/main/java/org/apache/geronimo/gshell/xstore/XStoreRecordImpl.java?rev=705707&r1=705706&r2=705707&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-xstore/src/main/java/org/apache/geronimo/gshell/xstore/XStoreRecordImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-xstore/src/main/java/org/apache/geronimo/gshell/xstore/XStoreRecordImpl.java
Fri Oct 17 11:56:45 2008
@@ -21,6 +21,7 @@
 
 import org.apache.commons.vfs.FileObject;
 import org.apache.commons.vfs.FileSystemException;
+import org.apache.geronimo.gshell.io.Closer;
 import org.apache.geronimo.gshell.marshal.Marshaller;
 import org.apache.geronimo.gshell.marshal.MarshallerSupport;
 import org.slf4j.Logger;
@@ -28,7 +29,6 @@
 
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
@@ -84,12 +84,7 @@
             throw new XStoreException(e);
         }
         finally {
-            try {
-                output.close();
-            }
-            catch (IOException e) {
-                // ignore
-            }
+            Closer.close(output);
         }
     }
 
@@ -117,12 +112,7 @@
             throw new XStoreException(e);
         }
         finally {
-            try {
-                input.close();
-            }
-            catch (IOException e) {
-                // ignore
-            }
+            Closer.close(input);
         }
     }
 



Mime
View raw message