< prev index next >

test/jdk/java/awt/FileDialog/8003399/bug8003399.java

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

*** 23,47 **** /* @test @bug 8003399 @summary JFileChooser gives wrong path to selected file when saving to Libraries folder on Windows 7 @author Semyon Sadetsky ! @library /lib/testlibrary ! @build jdk.testlibrary.OSInfo @run main bug8003399 */ ! import jdk.testlibrary.OSInfo; import javax.swing.filechooser.FileSystemView; import java.io.File; public class bug8003399 { public static void main(String[] args) throws Exception { ! if (OSInfo.getOSType() == OSInfo.OSType.WINDOWS && ! OSInfo.getWindowsVersion().compareTo(OSInfo.WINDOWS_VISTA) > 0 ) { FileSystemView fsv = FileSystemView.getFileSystemView(); for (File file : fsv.getFiles(fsv.getHomeDirectory(), false)) { if(file.isDirectory()) { for (File file1 : fsv.getFiles(file, false)) { if(file1.isDirectory()) --- 23,48 ---- /* @test @bug 8003399 @summary JFileChooser gives wrong path to selected file when saving to Libraries folder on Windows 7 @author Semyon Sadetsky ! @library /test/lib ! @build jdk.test.lib.OSVersion jdk.test.lib.Platform @run main bug8003399 */ ! import jdk.test.lib.Platform; ! import jdk.test.lib.OSVersion; import javax.swing.filechooser.FileSystemView; import java.io.File; public class bug8003399 { public static void main(String[] args) throws Exception { ! if (Platform.isWindows() && ! OSVersion.current().compareTo(OSVersion.WINDOWS_VISTA) > 0 ) { FileSystemView fsv = FileSystemView.getFileSystemView(); for (File file : fsv.getFiles(fsv.getHomeDirectory(), false)) { if(file.isDirectory()) { for (File file1 : fsv.getFiles(file, false)) { if(file1.isDirectory())
< prev index next >