mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
cleanup
This commit is contained in:
parent
ad7f8252b9
commit
a2ad3d7c0b
1 changed files with 4 additions and 8 deletions
|
@ -53,6 +53,7 @@ public class DictImportActivity extends XWActivity {
|
||||||
uri.getFragment() );
|
uri.getFragment() );
|
||||||
InputStream is = jUri.toURL().openStream();
|
InputStream is = jUri.toURL().openStream();
|
||||||
saveDict( is, uri.getPath() );
|
saveDict( is, uri.getPath() );
|
||||||
|
is.close();
|
||||||
} catch ( java.net.URISyntaxException use ) {
|
} catch ( java.net.URISyntaxException use ) {
|
||||||
Utils.logf( "URISyntaxException: %s" + use.toString() );
|
Utils.logf( "URISyntaxException: %s" + use.toString() );
|
||||||
} catch ( java.net.MalformedURLException mue ) {
|
} catch ( java.net.MalformedURLException mue ) {
|
||||||
|
@ -106,14 +107,9 @@ public class DictImportActivity extends XWActivity {
|
||||||
|
|
||||||
private void saveDict( InputStream inputStream, String path )
|
private void saveDict( InputStream inputStream, String path )
|
||||||
{
|
{
|
||||||
try {
|
|
||||||
String name = basename( path );
|
String name = basename( path );
|
||||||
GameUtils.saveDict( this, name, inputStream );
|
GameUtils.saveDict( this, name, inputStream );
|
||||||
DictLangCache.inval( GameUtils.removeDictExtn( name ) );
|
DictLangCache.inval( GameUtils.removeDictExtn( name ) );
|
||||||
inputStream.close();
|
|
||||||
} catch ( java.io.IOException ioe ) {
|
|
||||||
Utils.logf( "IOException: %s" + ioe.toString() );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String basename( String path )
|
private String basename( String path )
|
||||||
|
|
Loading…
Reference in a new issue