equal
deleted
inserted
replaced
28 import java.nio.file.FileSystem; |
28 import java.nio.file.FileSystem; |
29 import java.nio.file.FileSystems; |
29 import java.nio.file.FileSystems; |
30 import java.nio.file.Files; |
30 import java.nio.file.Files; |
31 import java.nio.file.Path; |
31 import java.nio.file.Path; |
32 import java.nio.file.Paths; |
32 import java.nio.file.Paths; |
|
33 import java.util.Collections; |
33 import java.util.stream.Stream; |
34 import java.util.stream.Stream; |
34 |
35 |
35 /** |
36 /** |
36 * Basic jrt file system functionality testing |
37 * Basic jrt file system functionality testing |
37 * |
38 * |
67 } |
68 } |
68 |
69 |
69 private static FileSystem createFsWithURLClassloader(String javaHome) throws IOException{ |
70 private static FileSystem createFsWithURLClassloader(String javaHome) throws IOException{ |
70 URL url = Paths.get(javaHome, "jrt-fs.jar").toUri().toURL(); |
71 URL url = Paths.get(javaHome, "jrt-fs.jar").toUri().toURL(); |
71 URLClassLoader loader = new URLClassLoader(new URL[] { url }); |
72 URLClassLoader loader = new URLClassLoader(new URL[] { url }); |
72 return FileSystems.newFileSystem(URI.create("jrt:/"), null, loader); |
73 return FileSystems.newFileSystem(URI.create("jrt:/"), |
|
74 Collections.emptyMap(), |
|
75 loader); |
73 } |
76 } |
74 |
77 |
75 private static FileSystem createFsByInstalledProvider() throws IOException { |
78 private static FileSystem createFsByInstalledProvider() throws IOException { |
76 return FileSystems.getFileSystem(URI.create("jrt:/")); |
79 return FileSystems.getFileSystem(URI.create("jrt:/")); |
77 } |
80 } |
78 } |
81 } |
79 |
|