diff options
author | Greg Lewis <glewis@FreeBSD.org> | 2013-03-27 03:06:50 +0000 |
---|---|---|
committer | Greg Lewis <glewis@FreeBSD.org> | 2013-03-27 03:06:50 +0000 |
commit | e2f338bdce831004bd2d4894d93ecf6256da59bd (patch) | |
tree | 542fee88b3e99e14ec5f44934dd5d40abc1ff67b /java | |
parent | 7d0916513e8b76c2511128c4f3223e32e2cc20ae (diff) | |
download | ports-e2f338bdce831004bd2d4894d93ecf6256da59bd.tar.gz ports-e2f338bdce831004bd2d4894d93ecf6256da59bd.zip |
Notes
Diffstat (limited to 'java')
-rw-r--r-- | java/openjdk7/files/patch-src-solaris-classes-sun-nio-fs-BsdFileSystemProvider.java | 21 | ||||
-rw-r--r-- | java/openjdk7/files/patch-src-solaris-classes-sun-nio-fs-DefaultFileSystemProvider.java | 37 |
2 files changed, 58 insertions, 0 deletions
diff --git a/java/openjdk7/files/patch-src-solaris-classes-sun-nio-fs-BsdFileSystemProvider.java b/java/openjdk7/files/patch-src-solaris-classes-sun-nio-fs-BsdFileSystemProvider.java new file mode 100644 index 000000000000..8897cbe56e30 --- /dev/null +++ b/java/openjdk7/files/patch-src-solaris-classes-sun-nio-fs-BsdFileSystemProvider.java @@ -0,0 +1,21 @@ +--- jdk/src/solaris/classes/sun/nio/fs/BsdFileSystemProvider.java.orig ++++ jdk/src/solaris/classes/sun/nio/fs/BsdFileSystemProvider.java +@@ -27,6 +27,7 @@ + + import java.nio.file.*; + import java.nio.file.attribute.*; ++import java.nio.file.spi.FileSystemProvider; + import java.io.IOException; + + /** +@@ -38,6 +39,10 @@ + super(); + } + ++ public BsdFileSystemProvider(FileSystemProvider f) { ++ super(); ++ } ++ + @Override + BsdFileSystem newFileSystem(String dir) { + return new BsdFileSystem(this, dir); diff --git a/java/openjdk7/files/patch-src-solaris-classes-sun-nio-fs-DefaultFileSystemProvider.java b/java/openjdk7/files/patch-src-solaris-classes-sun-nio-fs-DefaultFileSystemProvider.java new file mode 100644 index 000000000000..879be08c9206 --- /dev/null +++ b/java/openjdk7/files/patch-src-solaris-classes-sun-nio-fs-DefaultFileSystemProvider.java @@ -0,0 +1,37 @@ +--- jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java Sun Mar 10 14:04:37 2013 -0400 ++++ jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java Tue Mar 26 18:25:51 2013 -0700 +@@ -28,6 +28,8 @@ + import java.nio.file.spi.FileSystemProvider; + import java.security.AccessController; + import java.security.PrivilegedAction; ++import java.util.Set; ++import java.util.HashSet; + import sun.security.action.GetPropertyAction; + + /** +@@ -37,6 +39,14 @@ + public class DefaultFileSystemProvider { + private DefaultFileSystemProvider() { } + ++ private static final Set<String> validFileSystemProviders ++ = new HashSet<String>(); ++ static { ++ validFileSystemProviders.add("sun.nio.fs.SolarisFileSystemProvider"); ++ validFileSystemProviders.add("sun.nio.fs.LinuxFileSystemProvider"); ++ validFileSystemProviders.add("sun.nio.fs.BsdFileSystemProvider"); ++ } ++ + @SuppressWarnings("unchecked") + private static FileSystemProvider createProvider(final String cn) { + return AccessController +@@ -64,6 +74,10 @@ + public static FileSystemProvider create() { + String osname = AccessController + .doPrivileged(new GetPropertyAction("os.name")); ++ String fileSystemProvider = System ++ .getProperty("java.nio.file.spi.DefaultFileSystemProvider"); ++ if (validFileSystemProviders.contains(fileSystemProvider)) ++ return createProvider(fileSystemProvider); + if (osname.equals("SunOS")) + return createProvider("sun.nio.fs.SolarisFileSystemProvider"); + if (osname.equals("Linux")) |