X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Ftest%2FTest.java;fp=src%2Fbe%2Fnikiroo%2Ffanfix%2Ftest%2FTest.java;h=c5d852d397c5c746a6f2cd34b161b030aaa0496f;hp=3ff9a7ab8d139ad3e42c46f9caed8d504021f5e7;hb=9fe3f17729759e933d7687cc2838f7255f2c9283;hpb=312e756ed0306e3287f1bf111a5fab9027d46a92 diff --git a/src/be/nikiroo/fanfix/test/Test.java b/src/be/nikiroo/fanfix/test/Test.java index 3ff9a7a..c5d852d 100644 --- a/src/be/nikiroo/fanfix/test/Test.java +++ b/src/be/nikiroo/fanfix/test/Test.java @@ -47,12 +47,17 @@ public class Test extends TestLauncher { tmpCache.delete(); tmpCache.mkdir(); - FileOutputStream out = new FileOutputStream(new File(tmpConfig, - "config.properties")); - Properties props = new Properties(); - props.setProperty("CACHE_DIR", tmpCache.getAbsolutePath()); - props.store(out, null); - out.close(); + FileOutputStream out = null; + try { + out = new FileOutputStream(new File(tmpConfig, "config.properties")); + Properties props = new Properties(); + props.setProperty("CACHE_DIR", tmpCache.getAbsolutePath()); + props.store(out, null); + } finally { + if (out != null) { + out.close(); + } + } ConfigBundle config = new ConfigBundle(); Bundles.setDirectory(tmpConfig.getAbsolutePath());