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

Print this page
rev 8725 : 8024854: Basic changes and files to build the class library on AIX
Contributed-by: luchsh@linux.vnet.ibm.com, spoole@linux.vnet.ibm.com, thomas.stuefe@sap.com
Reviewed-by: alanb, prr, sla, chegar, michaelm, mullan


  46         }
  47         try {
  48             return c.newInstance();
  49         } catch (IllegalAccessException | InstantiationException x) {
  50             throw new AssertionError(x);
  51         }
  52     }
  53 
  54     /**
  55      * Returns the default FileSystemProvider.
  56      */
  57     public static FileSystemProvider create() {
  58         String osname = AccessController
  59             .doPrivileged(new GetPropertyAction("os.name"));
  60         if (osname.equals("SunOS"))
  61             return createProvider("sun.nio.fs.SolarisFileSystemProvider");
  62         if (osname.equals("Linux"))
  63             return createProvider("sun.nio.fs.LinuxFileSystemProvider");
  64         if (osname.contains("OS X"))
  65             return createProvider("sun.nio.fs.MacOSXFileSystemProvider");


  66         throw new AssertionError("Platform not recognized");
  67     }
  68 }


  46         }
  47         try {
  48             return c.newInstance();
  49         } catch (IllegalAccessException | InstantiationException x) {
  50             throw new AssertionError(x);
  51         }
  52     }
  53 
  54     /**
  55      * Returns the default FileSystemProvider.
  56      */
  57     public static FileSystemProvider create() {
  58         String osname = AccessController
  59             .doPrivileged(new GetPropertyAction("os.name"));
  60         if (osname.equals("SunOS"))
  61             return createProvider("sun.nio.fs.SolarisFileSystemProvider");
  62         if (osname.equals("Linux"))
  63             return createProvider("sun.nio.fs.LinuxFileSystemProvider");
  64         if (osname.contains("OS X"))
  65             return createProvider("sun.nio.fs.MacOSXFileSystemProvider");
  66         if (osname.equals("AIX"))
  67             return createProvider("sun.nio.fs.AixFileSystemProvider");
  68         throw new AssertionError("Platform not recognized");
  69     }
  70 }