[Minor] code cleanup
This commit is contained in:
parent
7f2b7435a9
commit
7ec21839d9
|
@ -259,7 +259,7 @@ public class FileHelper {
|
||||||
if (srcFile.isDirectory()) {
|
if (srcFile.isDirectory()) {
|
||||||
dstFile.mkdir();
|
dstFile.mkdir();
|
||||||
if (!copy(srcFile.listFiles(), dstFile, checksum)) {
|
if (!copy(srcFile.listFiles(), dstFile, checksum)) {
|
||||||
String msg = "Failed to copy contents of {0} to {1}";
|
String msg = "Failed to copy contents of {0} to {1}"; //$NON-NLS-1$
|
||||||
msg = MessageFormat.format(msg, srcFile.getAbsolutePath(), dstFile.getAbsolutePath());
|
msg = MessageFormat.format(msg, srcFile.getAbsolutePath(), dstFile.getAbsolutePath());
|
||||||
logger.error(msg);
|
logger.error(msg);
|
||||||
return false;
|
return false;
|
||||||
|
@ -315,7 +315,7 @@ public class FileHelper {
|
||||||
|
|
||||||
// cleanup if files are not the same length
|
// cleanup if files are not the same length
|
||||||
if (fromFile.length() != toFile.length()) {
|
if (fromFile.length() != toFile.length()) {
|
||||||
String msg = "Copying failed, as new files are not the same length: {0} / {1}";
|
String msg = "Copying failed, as new files are not the same length: {0} / {1}"; //$NON-NLS-1$
|
||||||
msg = MessageFormat.format(msg, fromFile.length(), toFile.length());
|
msg = MessageFormat.format(msg, fromFile.length(), toFile.length());
|
||||||
FileHelper.logger.error(msg);
|
FileHelper.logger.error(msg);
|
||||||
toFile.delete();
|
toFile.delete();
|
||||||
|
@ -324,7 +324,7 @@ public class FileHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String msg = MessageFormat.format("Failed to copy path from {0} to + {1} due to:", fromFile, toFile);
|
String msg = MessageFormat.format("Failed to copy path from {0} to + {1} due to:", fromFile, toFile); //$NON-NLS-1$
|
||||||
FileHelper.logger.error(msg, e);
|
FileHelper.logger.error(msg, e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue