Skip to content

Commit 6765275

Browse files
Update variable name (#241)
1 parent f00c488 commit 6765275

File tree

1 file changed

+6
-6
lines changed
  • dledger/src/main/java/io/openmessaging/storage/dledger/utils

1 file changed

+6
-6
lines changed

dledger/src/main/java/io/openmessaging/storage/dledger/utils/IOUtils.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -366,23 +366,23 @@ public static void atomicMvFile(File srcFile, File destFile) throws IOException
366366
Files.move(srcPath, destPath, StandardCopyOption.ATOMIC_MOVE);
367367
} catch (IOException mvFailed) {
368368
if (mvFailed instanceof AtomicMoveNotSupportedException) {
369-
logger.warn("Unable to support atomic move, back to non-atomic move, error: {}", mvFailed.getMessage());
369+
LOGGER.warn("Unable to support atomic move, back to non-atomic move, error: {}", mvFailed.getMessage());
370370
} else {
371-
logger.warn("Unable to move files atomically, back to non-atomic move, error: {}", mvFailed.getMessage());
371+
LOGGER.warn("Unable to move files atomically, back to non-atomic move, error: {}", mvFailed.getMessage());
372372
}
373373
if (destFile.exists()) {
374-
logger.info("The file has already existed in the destination location {}", destPath);
374+
LOGGER.info("The file has already existed in the destination location {}", destPath);
375375
}
376376
try {
377377
Files.move(srcPath, destPath, StandardCopyOption.REPLACE_EXISTING);
378378
} catch (IOException replaceFailed) {
379379
replaceFailed.addSuppressed(mvFailed);
380-
logger.warn("Unable to move {} to {}. Try deleting {}", srcPath, destPath, srcPath);
380+
LOGGER.warn("Unable to move {} to {}. Try deleting {}", srcPath, destPath, srcPath);
381381
try {
382382
Files.deleteIfExists(srcPath);
383383
} catch (IOException deleteFailed) {
384384
deleteFailed.addSuppressed(replaceFailed);
385-
logger.warn("Unable to delete {}", srcPath);
385+
LOGGER.warn("Unable to delete {}", srcPath);
386386
throw deleteFailed;
387387
}
388388
throw replaceFailed;
@@ -396,7 +396,7 @@ public static void fsync(File file) throws IOException {
396396
boolean isDir = file.isDirectory();
397397
// Unable to force sync on Windows
398398
if (isDir && System.getProperty("os.name").toLowerCase().contains("win")) {
399-
logger.warn("Unable to force sync directory {} on Windows", file);
399+
LOGGER.warn("Unable to force sync directory {} on Windows", file);
400400
return;
401401
}
402402
try (final FileChannel fc = FileChannel.open(file.toPath(), isDir ? StandardOpenOption.READ

0 commit comments

Comments
 (0)