6894504: javax/swing/JFileChooser/6741890/bug6741890.java fails w/ RuntimeException
authorrupashka
Fri, 30 Oct 2009 14:05:48 +0300
changeset 4273 19adfe928d6c
parent 4272 f4742294ef29
child 4274 02ccf52bf1ba
6894504: javax/swing/JFileChooser/6741890/bug6741890.java fails w/ RuntimeException Reviewed-by: malenkov
jdk/test/javax/swing/JFileChooser/6741890/bug6741890.java
--- a/jdk/test/javax/swing/JFileChooser/6741890/bug6741890.java	Thu Oct 22 18:42:18 2009 +0400
+++ b/jdk/test/javax/swing/JFileChooser/6741890/bug6741890.java	Fri Oct 30 14:05:48 2009 +0300
@@ -29,6 +29,7 @@
 */
 
 import sun.awt.shell.ShellFolder;
+import sun.awt.OSInfo;
 
 import java.io.File;
 import java.lang.reflect.Field;
@@ -43,6 +44,12 @@
     private static final int COUNT = 100000;
 
     public static void main(String[] args) throws Exception {
+        if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) {
+            System.out.println("The test is applicable only for Windows. Skipped.");
+
+            return;
+        }
+
         String tmpDir = System.getProperty("java.io.tmpdir");
 
         if (tmpDir.length() == 0) { //'java.io.tmpdir' isn't guaranteed to be defined