--- old/src/java.base/share/classes/java/nio/file/FileSystems.java 2017-04-22 21:31:17.495179924 +0200 +++ new/src/java.base/share/classes/java/nio/file/FileSystems.java 2017-04-22 21:31:17.411181374 +0200 @@ -145,6 +145,15 @@ } /** + * Returns the builtin {@code FileSystem}. + * + * @return the builtin file system + */ + static FileSystem getBuiltin() { + return BuiltinFileSystemHolder.builtinFileSystem; + } + + /** * Returns the default {@code FileSystem}. The default file system creates * objects that provide access to the file systems accessible to the Java * virtual machine. The working directory of the file system is --- old/src/java.base/share/classes/java/nio/file/Path.java 2017-04-22 21:31:17.757175404 +0200 +++ new/src/java.base/share/classes/java/nio/file/Path.java 2017-04-22 21:31:17.680176732 +0200 @@ -652,7 +652,8 @@ * if this {@code Path} is not associated with the default provider */ default File toFile() { - if (getFileSystem() == FileSystems.getDefault()) { + if (getFileSystem() == FileSystems.getBuiltin() || + getFileSystem() == FileSystems.getDefault()) { return new File(toString()); } else { throw new UnsupportedOperationException("Path not associated with "