Fix some warnings reported by Eclipse.

This commit is contained in:
Myrd
2015-12-25 23:39:49 +00:00
parent 6fe4c683a5
commit 3aa0e71675
2 changed files with 8 additions and 3 deletions

View File

@@ -1010,15 +1010,21 @@ public class ImportDialog {
destFile.createNewFile();
}
FileInputStream srcStream = null;
FileChannel src = null;
FileOutputStream destStream = null;
FileChannel dest = null;
try {
src = new FileInputStream(srcFile).getChannel();
dest = new FileOutputStream(destFile).getChannel();
srcStream = new FileInputStream(srcFile);
src = srcStream.getChannel();
destStream = new FileOutputStream(destFile);
dest = destStream.getChannel();
dest.transferFrom(src, 0, src.size());
} finally {
if (src != null) { src.close(); }
if (srcStream != null) { srcStream.close(); }
if (dest != null) { dest.close(); }
if (destStream != null) { destStream.close(); }
}
if (deleteSrcAfter) {