< prev index next >

test/jdk/javax/swing/JFileChooser/8062561/bug8062561.java

Print this page
rev 51542 : 8210039: move OSInfo to top level testlibrary
Reviewed-by: duke

*** 19,29 **** * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ ! import jdk.testlibrary.OSInfo; import java.awt.Robot; import java.awt.event.KeyEvent; import java.io.File; import java.io.IOException; import java.io.InputStream; --- 19,29 ---- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ ! import jdk.test.lib.Platform; import java.awt.Robot; import java.awt.event.KeyEvent; import java.io.File; import java.io.IOException; import java.io.InputStream;
*** 37,49 **** * @test * @bug 8062561 * @key headful * @requires (os.family == "windows") * @summary File system view returns null default directory ! * @library ../../../../lib/testlibrary * @modules java.desktop/sun.awt ! * @build jdk.testlibrary.OSInfo * @run main/othervm bug8062561 GENERATE_POLICY * @run main/othervm/policy=security.policy bug8062561 CHECK_DEFAULT_DIR run */ public class bug8062561 { --- 37,49 ---- * @test * @bug 8062561 * @key headful * @requires (os.family == "windows") * @summary File system view returns null default directory ! * @library /test/lib * @modules java.desktop/sun.awt ! * @build jdk.test.lib.Platform * @run main/othervm bug8062561 GENERATE_POLICY * @run main/othervm/policy=security.policy bug8062561 CHECK_DEFAULT_DIR run */ public class bug8062561 {
*** 117,127 **** private static void generatePolicyFile() throws Exception { if (System.getSecurityManager() != null) { throw new RuntimeException("Security manager should be null!"); } ! if (!OSInfo.getOSType().equals(OSInfo.OSType.WINDOWS)) { return; } File defaultDirectory = FileSystemView.getFileSystemView(). getDefaultDirectory(); --- 117,127 ---- private static void generatePolicyFile() throws Exception { if (System.getSecurityManager() != null) { throw new RuntimeException("Security manager should be null!"); } ! if (!Platform.isWindows()) { return; } File defaultDirectory = FileSystemView.getFileSystemView(). getDefaultDirectory();
< prev index next >