|
@@ -67,6 +67,9 @@ import java.io.File;
|
67
|
67
|
import java.io.FileWriter;
|
68
|
68
|
import java.io.IOException;
|
69
|
69
|
import java.math.BigInteger;
|
|
70
|
+import java.nio.file.Files;
|
|
71
|
+import java.nio.file.Path;
|
|
72
|
+import java.nio.file.Paths;
|
70
|
73
|
import java.security.MessageDigest;
|
71
|
74
|
import java.security.NoSuchAlgorithmException;
|
72
|
75
|
import java.text.DateFormat;
|
|
@@ -410,8 +413,8 @@ public class LoggingManager implements ConfigChangeListener {
|
410
|
413
|
return;
|
411
|
414
|
}
|
412
|
415
|
|
413
|
|
- final File testFile = new File(filename);
|
414
|
|
- if (testFile.exists()) {
|
|
416
|
+ final Path testFile = Paths.get(filename);
|
|
417
|
+ if (Files.exists(testFile)) {
|
415
|
418
|
try {
|
416
|
419
|
final ReverseFileReader file = new ReverseFileReader(testFile);
|
417
|
420
|
// Because the file includes a newline char at the end, an empty line
|
|
@@ -768,9 +771,9 @@ public class LoggingManager implements ConfigChangeListener {
|
768
|
771
|
return false;
|
769
|
772
|
}
|
770
|
773
|
|
771
|
|
- final String log = getLogFile(descriptor);
|
|
774
|
+ final Path log = Paths.get(getLogFile(descriptor));
|
772
|
775
|
|
773
|
|
- if (!new File(log).exists()) {
|
|
776
|
+ if (!Files.exists(log)) {
|
774
|
777
|
// File doesn't exist
|
775
|
778
|
return false;
|
776
|
779
|
}
|