6845805: Test for CR 6713352 is failed under Linux
authorrupashka
Thu May 28 18:11:07 2009 +0400 (9 months ago)
changeset 1264019908df0313
parent 1263993a5f0fe2e0
child 1265951ecbad4068
child 13151bbbd0ef5d04
6845805: Test for CR 6713352 is failed under Linux
Reviewed-by: malenkov
test/javax/swing/JFileChooser/6713352/bug6713352.java
--- a/test/javax/swing/JFileChooser/6713352/bug6713352.java Fri May 15 17:26:45 2009 +0400
+++ b/test/javax/swing/JFileChooser/6713352/bug6713352.java Thu May 28 18:11:07 2009 +0400
@@ -40,6 +40,12 @@ public class bug6713352 {
public static void main(String[] args) throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
+ String tempDir = System.getProperty("java.io.tmpdir");
+
+ if (tempDir == null || !new File(tempDir).isDirectory()) {
+ tempDir = System.getProperty("user.home");
+ }
+
MyFileSystemView systemView = new MyFileSystemView();
synchronized (systemView) { // Get SystemView lock
@@ -56,7 +62,7 @@ public class bug6713352 {
try {
System.out.println("Try to get Invokers lock");
- ShellFolder.getShellFolder(new File("c:/")).listFiles(true);
+ ShellFolder.getShellFolder(new File(tempDir)).listFiles(true);
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
}