Java Code Examples for sun.awt.shell.ShellFolder#isFileSystemRoot()
The following examples show how to use
sun.awt.shell.ShellFolder#isFileSystemRoot() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: bug6945316.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) { System.out.println("The test is suitable only for Windows OS. Skipped."); return; } // Init toolkit because it shouldn't be interrupted while initialization Toolkit.getDefaultToolkit(); // Init the sun.awt.shell.Win32ShellFolderManager2.drives field ShellFolder.get("fileChooserComboBoxFolders"); // To get NPE the path must obey the following rules: // path.length() == 3 && path.charAt(1) == ':' final File tempFile = new File("c:\\"); for (int i = 0; i < 10000; i++) { final CountDownLatch countDownLatch = new CountDownLatch(1); final Thread thread = new Thread() { public void run() { countDownLatch.countDown(); ShellFolder.isFileSystemRoot(tempFile); } }; thread.start(); countDownLatch.await(); thread.interrupt(); } }
Example 2
Source File: bug6945316.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) { System.out.println("The test is suitable only for Windows OS. Skipped."); return; } // Init toolkit because it shouldn't be interrupted while initialization Toolkit.getDefaultToolkit(); // Init the sun.awt.shell.Win32ShellFolderManager2.drives field ShellFolder.get("fileChooserComboBoxFolders"); // To get NPE the path must obey the following rules: // path.length() == 3 && path.charAt(1) == ':' final File tempFile = new File("c:\\"); for (int i = 0; i < 10000; i++) { final CountDownLatch countDownLatch = new CountDownLatch(1); final Thread thread = new Thread() { public void run() { countDownLatch.countDown(); ShellFolder.isFileSystemRoot(tempFile); } }; thread.start(); countDownLatch.await(); thread.interrupt(); } }
Example 3
Source File: bug6945316.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) { System.out.println("The test is suitable only for Windows OS. Skipped."); return; } // Init toolkit because it shouldn't be interrupted while initialization Toolkit.getDefaultToolkit(); // Init the sun.awt.shell.Win32ShellFolderManager2.drives field ShellFolder.get("fileChooserComboBoxFolders"); // To get NPE the path must obey the following rules: // path.length() == 3 && path.charAt(1) == ':' final File tempFile = new File("c:\\"); for (int i = 0; i < 10000; i++) { final CountDownLatch countDownLatch = new CountDownLatch(1); final Thread thread = new Thread() { public void run() { countDownLatch.countDown(); ShellFolder.isFileSystemRoot(tempFile); } }; thread.start(); countDownLatch.await(); thread.interrupt(); } }
Example 4
Source File: bug6945316.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) { System.out.println("The test is suitable only for Windows OS. Skipped."); return; } // Init toolkit because it shouldn't be interrupted while initialization Toolkit.getDefaultToolkit(); // Init the sun.awt.shell.Win32ShellFolderManager2.drives field ShellFolder.get("fileChooserComboBoxFolders"); // To get NPE the path must obey the following rules: // path.length() == 3 && path.charAt(1) == ':' final File tempFile = new File("c:\\"); for (int i = 0; i < 10000; i++) { final CountDownLatch countDownLatch = new CountDownLatch(1); final Thread thread = new Thread() { public void run() { countDownLatch.countDown(); ShellFolder.isFileSystemRoot(tempFile); } }; thread.start(); countDownLatch.await(); thread.interrupt(); } }
Example 5
Source File: bug6945316.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) { System.out.println("The test is suitable only for Windows OS. Skipped."); return; } // Init toolkit because it shouldn't be interrupted while initialization Toolkit.getDefaultToolkit(); // Init the sun.awt.shell.Win32ShellFolderManager2.drives field ShellFolder.get("fileChooserComboBoxFolders"); // To get NPE the path must obey the following rules: // path.length() == 3 && path.charAt(1) == ':' final File tempFile = new File("c:\\"); for (int i = 0; i < 10000; i++) { final CountDownLatch countDownLatch = new CountDownLatch(1); final Thread thread = new Thread() { public void run() { countDownLatch.countDown(); ShellFolder.isFileSystemRoot(tempFile); } }; thread.start(); countDownLatch.await(); thread.interrupt(); } }
Example 6
Source File: bug6945316.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) { System.out.println("The test is suitable only for Windows OS. Skipped."); return; } // Init toolkit because it shouldn't be interrupted while initialization Toolkit.getDefaultToolkit(); // Init the sun.awt.shell.Win32ShellFolderManager2.drives field ShellFolder.get("fileChooserComboBoxFolders"); // To get NPE the path must obey the following rules: // path.length() == 3 && path.charAt(1) == ':' final File tempFile = new File("c:\\"); for (int i = 0; i < 10000; i++) { final CountDownLatch countDownLatch = new CountDownLatch(1); final Thread thread = new Thread() { public void run() { countDownLatch.countDown(); ShellFolder.isFileSystemRoot(tempFile); } }; thread.start(); countDownLatch.await(); thread.interrupt(); } }
Example 7
Source File: bug6945316.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) { System.out.println("The test is suitable only for Windows OS. Skipped."); return; } // Init toolkit because it shouldn't be interrupted while initialization Toolkit.getDefaultToolkit(); // Init the sun.awt.shell.Win32ShellFolderManager2.drives field ShellFolder.get("fileChooserComboBoxFolders"); // To get NPE the path must obey the following rules: // path.length() == 3 && path.charAt(1) == ':' final File tempFile = new File("c:\\"); for (int i = 0; i < 10000; i++) { final CountDownLatch countDownLatch = new CountDownLatch(1); final Thread thread = new Thread() { public void run() { countDownLatch.countDown(); ShellFolder.isFileSystemRoot(tempFile); } }; thread.start(); countDownLatch.await(); thread.interrupt(); } }
Example 8
Source File: bug6945316.java From hottub with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) { System.out.println("The test is suitable only for Windows OS. Skipped."); return; } // Init toolkit because it shouldn't be interrupted while initialization Toolkit.getDefaultToolkit(); // Init the sun.awt.shell.Win32ShellFolderManager2.drives field ShellFolder.get("fileChooserComboBoxFolders"); // To get NPE the path must obey the following rules: // path.length() == 3 && path.charAt(1) == ':' final File tempFile = new File("c:\\"); for (int i = 0; i < 10000; i++) { final CountDownLatch countDownLatch = new CountDownLatch(1); final Thread thread = new Thread() { public void run() { countDownLatch.countDown(); ShellFolder.isFileSystemRoot(tempFile); } }; thread.start(); countDownLatch.await(); thread.interrupt(); } }
Example 9
Source File: bug6945316.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) { System.out.println("The test is suitable only for Windows OS. Skipped."); return; } // Init toolkit because it shouldn't be interrupted while initialization Toolkit.getDefaultToolkit(); // Init the sun.awt.shell.Win32ShellFolderManager2.drives field ShellFolder.get("fileChooserComboBoxFolders"); // To get NPE the path must obey the following rules: // path.length() == 3 && path.charAt(1) == ':' final File tempFile = new File("c:\\"); for (int i = 0; i < 10000; i++) { final CountDownLatch countDownLatch = new CountDownLatch(1); final Thread thread = new Thread() { public void run() { countDownLatch.countDown(); ShellFolder.isFileSystemRoot(tempFile); } }; thread.start(); countDownLatch.await(); thread.interrupt(); } }
Example 10
Source File: bug6945316.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) { System.out.println("The test is suitable only for Windows OS. Skipped."); return; } // Init toolkit because it shouldn't be interrupted while initialization Toolkit.getDefaultToolkit(); // Init the sun.awt.shell.Win32ShellFolderManager2.drives field ShellFolder.get("fileChooserComboBoxFolders"); // To get NPE the path must obey the following rules: // path.length() == 3 && path.charAt(1) == ':' final File tempFile = new File("c:\\"); for (int i = 0; i < 10000; i++) { final CountDownLatch countDownLatch = new CountDownLatch(1); final Thread thread = new Thread() { public void run() { countDownLatch.countDown(); ShellFolder.isFileSystemRoot(tempFile); } }; thread.start(); countDownLatch.await(); thread.interrupt(); } }
Example 11
Source File: bug6945316.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) { System.out.println("The test is suitable only for Windows OS. Skipped."); return; } // Init toolkit because it shouldn't be interrupted while initialization Toolkit.getDefaultToolkit(); // Init the sun.awt.shell.Win32ShellFolderManager2.drives field ShellFolder.get("fileChooserComboBoxFolders"); // To get NPE the path must obey the following rules: // path.length() == 3 && path.charAt(1) == ':' final File tempFile = new File("c:\\"); for (int i = 0; i < 10000; i++) { final CountDownLatch countDownLatch = new CountDownLatch(1); final Thread thread = new Thread() { public void run() { countDownLatch.countDown(); ShellFolder.isFileSystemRoot(tempFile); } }; thread.start(); countDownLatch.await(); thread.interrupt(); } }
Example 12
Source File: bug6945316.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) { System.out.println("The test is suitable only for Windows OS. Skipped."); return; } // Init toolkit because it shouldn't be interrupted while initialization Toolkit.getDefaultToolkit(); // Init the sun.awt.shell.Win32ShellFolderManager2.drives field ShellFolder.get("fileChooserComboBoxFolders"); // To get NPE the path must obey the following rules: // path.length() == 3 && path.charAt(1) == ':' final File tempFile = new File("c:\\"); for (int i = 0; i < 10000; i++) { final CountDownLatch countDownLatch = new CountDownLatch(1); final Thread thread = new Thread() { public void run() { countDownLatch.countDown(); ShellFolder.isFileSystemRoot(tempFile); } }; thread.start(); countDownLatch.await(); thread.interrupt(); } }
Example 13
Source File: bug6945316.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) { System.out.println("The test is suitable only for Windows OS. Skipped."); return; } // Init toolkit because it shouldn't be interrupted while initialization Toolkit.getDefaultToolkit(); // Init the sun.awt.shell.Win32ShellFolderManager2.drives field ShellFolder.get("fileChooserComboBoxFolders"); // To get NPE the path must obey the following rules: // path.length() == 3 && path.charAt(1) == ':' final File tempFile = new File("c:\\"); for (int i = 0; i < 10000; i++) { final CountDownLatch countDownLatch = new CountDownLatch(1); final Thread thread = new Thread() { public void run() { countDownLatch.countDown(); ShellFolder.isFileSystemRoot(tempFile); } }; thread.start(); countDownLatch.await(); thread.interrupt(); } }
Example 14
Source File: FileSystemView.java From Bytecoder with Apache License 2.0 | 2 votes |
/** * Is dir the root of a tree in the file system, such as a drive * or partition. Example: Returns true for "C:\" on Windows 98. * * @param dir a <code>File</code> object representing a directory * @return <code>true</code> if <code>f</code> is a root of a filesystem * @see #isRoot * @since 1.4 */ public boolean isFileSystemRoot(File dir) { return ShellFolder.isFileSystemRoot(dir); }