< prev index next >

src/java.base/linux/classes/sun/nio/fs/BuiltinFileSystemProvider.java

Print this page
8213406: (fs) More than one instance of built-in FileSystem observed in heap
Reviewed-by: alanb, cushon, weijun

*** 23,43 **** * questions. */ package sun.nio.fs; ! import java.nio.file.spi.FileSystemProvider; /** ! * Creates this platform's default FileSystemProvider. */ ! public class DefaultFileSystemProvider { ! private DefaultFileSystemProvider() { } ! /** ! * Returns the default FileSystemProvider. ! */ ! public static FileSystemProvider create() { ! return new LinuxFileSystemProvider(); ! } } --- 23,45 ---- * questions. */ package sun.nio.fs; ! import java.net.URI; ! import java.nio.file.FileSystem; /** ! * Creates this platform's builtin FileSystemProvider and FileSystem. */ ! public class BuiltinFileSystemProvider { ! private BuiltinFileSystemProvider() { } ! /** The unique instance of the builtin file system provider. */ ! public static final LinuxFileSystemProvider BUILTIN_FILE_SYSTEM_PROVIDER ! = new LinuxFileSystemProvider(); ! ! /** The unique instance of the builtin file system. */ ! public static final FileSystem BUILTIN_FILE_SYSTEM ! = BUILTIN_FILE_SYSTEM_PROVIDER.getFileSystem(URI.create("file:///")); }
< prev index next >