From a2ad3d7c0bb7e04f2657d9df9b5d52225e073e91 Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 8 Feb 2011 21:07:31 -0800 Subject: [PATCH] cleanup --- .../org/eehouse/android/xw4/DictImportActivity.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictImportActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictImportActivity.java index 769b98c49..325e8c990 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictImportActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictImportActivity.java @@ -53,6 +53,7 @@ public class DictImportActivity extends XWActivity { uri.getFragment() ); InputStream is = jUri.toURL().openStream(); saveDict( is, uri.getPath() ); + is.close(); } catch ( java.net.URISyntaxException use ) { Utils.logf( "URISyntaxException: %s" + use.toString() ); } catch ( java.net.MalformedURLException mue ) { @@ -106,14 +107,9 @@ public class DictImportActivity extends XWActivity { private void saveDict( InputStream inputStream, String path ) { - try { - String name = basename( path ); - GameUtils.saveDict( this, name, inputStream ); - DictLangCache.inval( GameUtils.removeDictExtn( name ) ); - inputStream.close(); - } catch ( java.io.IOException ioe ) { - Utils.logf( "IOException: %s" + ioe.toString() ); - } + String name = basename( path ); + GameUtils.saveDict( this, name, inputStream ); + DictLangCache.inval( GameUtils.removeDictExtn( name ) ); } private String basename( String path )