< prev index next >

src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java

Print this page
rev 8219 : 8024900: PPC64: Enable new build on AIX (jdk part)
8024854: PPC64: Basic changes and files to build the class library on AIX
Reviewed-by: alanb, prr, sla, chegar, michaelm, mullan, art, erikj
Contributed-by: luchsh@linux.vnet.ibm.com, spoole@linux.vnet.ibm.com, thomas.stuefe@sap.com


  53                     } catch (IllegalAccessException x) {
  54                         throw new AssertionError(x);
  55                     } catch (InstantiationException x) {
  56                         throw new AssertionError(x);
  57                     }
  58             }});
  59     }
  60 
  61     /**
  62      * Returns the default FileSystemProvider.
  63      */
  64     public static FileSystemProvider create() {
  65         String osname = AccessController
  66             .doPrivileged(new GetPropertyAction("os.name"));
  67         if (osname.equals("SunOS"))
  68             return createProvider("sun.nio.fs.SolarisFileSystemProvider");
  69         if (osname.equals("Linux"))
  70             return createProvider("sun.nio.fs.LinuxFileSystemProvider");
  71         if (osname.equals("Darwin") || osname.contains("OS X"))
  72             return createProvider("sun.nio.fs.MacOSXFileSystemProvider");


  73         throw new AssertionError("Platform not recognized");
  74     }
  75 }


  53                     } catch (IllegalAccessException x) {
  54                         throw new AssertionError(x);
  55                     } catch (InstantiationException x) {
  56                         throw new AssertionError(x);
  57                     }
  58             }});
  59     }
  60 
  61     /**
  62      * Returns the default FileSystemProvider.
  63      */
  64     public static FileSystemProvider create() {
  65         String osname = AccessController
  66             .doPrivileged(new GetPropertyAction("os.name"));
  67         if (osname.equals("SunOS"))
  68             return createProvider("sun.nio.fs.SolarisFileSystemProvider");
  69         if (osname.equals("Linux"))
  70             return createProvider("sun.nio.fs.LinuxFileSystemProvider");
  71         if (osname.equals("Darwin") || osname.contains("OS X"))
  72             return createProvider("sun.nio.fs.MacOSXFileSystemProvider");
  73         if (osname.equals("AIX") || osname.equals("OS400"))
  74             return createProvider("sun.nio.fs.AixFileSystemProvider");
  75         throw new AssertionError("Platform not recognized");
  76     }
  77 }
< prev index next >