diff --git a/src/org/dclermonte/siba/model/SibaUtils.java b/src/org/dclermonte/siba/model/SibaUtils.java index 567a7fc..fc997be 100644 --- a/src/org/dclermonte/siba/model/SibaUtils.java +++ b/src/org/dclermonte/siba/model/SibaUtils.java @@ -65,22 +65,23 @@ public class SibaUtils public static File createMD5File(final String md5, final String fileName, final String target) throws IOException { File result; - FileWriter fileWriter = null; + FileWriter out = null; try { result = new File(target); - fileWriter = new FileWriter(result); - fileWriter.write(md5); + out = new FileWriter(result); + out.write(md5); String newLine = System.getProperty("line.separator"); - fileWriter.append(" "); - fileWriter.append(fileName); - fileWriter.append(newLine); - fileWriter.close(); + out.append(" "); + out.append(fileName); + out.append(newLine); + out.close(); } finally { - IOUtils.closeQuietly(fileWriter); + IOUtils.closeQuietly(out); } + // return result; } @@ -182,7 +183,6 @@ public class SibaUtils FileReader in = null; try { - // result = null; if (choosenFile.exists() && (choosenFile.length() > 32)) { in = new FileReader(choosenFile); @@ -200,7 +200,6 @@ public class SibaUtils String path = System.getProperty("user.dir"); result = new File(path + "/" + fileNameToString); } - } else {