From: Sweidan Omar Date: Fri, 21 Jan 2022 02:08:58 +0000 (+0000) Subject: git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube... X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=502990a5d647a0f1711fce3712fbc2a528add292;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C32842 --- diff --git a/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/SmallTests.java b/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/SmallTests.java index 76ba63df..e60e99ec 100644 --- a/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/SmallTests.java +++ b/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/SmallTests.java @@ -102,7 +102,7 @@ public class SmallTests { System.out.println("Loading " + className); Path path = Paths.get(root, className + ".java"); Class result = null; - if (!path.toFile().exists()) + if (!Files.exists(path)) return result; List lines = Files.readAllLines(path); @@ -354,12 +354,12 @@ public class SmallTests { public void test92() throws Exception { Path p = Paths.get(Paths.get("/Temp/xxx/").toString(), "test1.json"); - System.out.println(p.toFile().exists()); + System.out.println(Files.exists(p)); System.out.println(Files.isSymbolicLink(p)); Path p1 = Paths.get("/Temp/xxx/test2.json"); - System.out.println(p1.toFile().exists()); + System.out.println(Files.exists(p1)); System.out.println(Files.isSymbolicLink(p1)); } @@ -1055,16 +1055,16 @@ public class SmallTests { public void test9997() throws Exception { Path sut = Paths.get("/opt/test.mxf"); Path catched = Paths.get("/opt/.STATUS/test.mxf.catched"); - assertFalse(catched.toFile().exists()); + assertFalse(Files.exists(catched)); assertFalse(EscortFiles.isMediaCatched(sut)); EscortFiles.createMediaCatch(sut); - assertTrue(catched.toFile().exists()); + assertTrue(Files.exists(catched)); assertTrue(EscortFiles.isMediaCatched(sut)); EscortFiles.removeMediaCatch(sut); - assertFalse(catched.toFile().exists()); + assertFalse(Files.exists(catched)); assertFalse(EscortFiles.isMediaCatched(sut)); } @@ -1156,9 +1156,9 @@ public class SmallTests { @Test public void test99992() throws Exception { - System.out.println(Paths.get("/opt/exists").toFile().exists()); + System.out.println(Files.exists(Paths.get("/opt/exists"))); int i = 1; - System.out.println(Paths.get("/opt/exists").toFile().exists()); + System.out.println(Files.exists(Paths.get("/opt/exists"))); } @Test