--- a/src/java.base/macosx/classes/sun/nio/fs/DefaultFileSystemProvider.java Wed Nov 28 16:05:48 2018 -0500
+++ b/src/java.base/macosx/classes/sun/nio/fs/DefaultFileSystemProvider.java Wed Nov 28 14:28:28 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,19 +25,29 @@
package sun.nio.fs;
-import java.nio.file.spi.FileSystemProvider;
+import java.nio.file.FileSystem;
/**
* Creates this platform's default FileSystemProvider.
*/
public class DefaultFileSystemProvider {
+ private static final MacOSXFileSystemProvider INSTANCE
+ = new MacOSXFileSystemProvider();
+
private DefaultFileSystemProvider() { }
/**
- * Returns the default FileSystemProvider.
+ * Returns the platform's default file system provider.
*/
- public static FileSystemProvider create() {
- return new MacOSXFileSystemProvider();
+ public static MacOSXFileSystemProvider instance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Returns the platform's default file system.
+ */
+ public static FileSystem theFileSystem() {
+ return INSTANCE.theFileSystem();
}
}