8168899: java.nio.file.InvalidPathException if click button in JFileChooser demo of SwingSet2
Reviewed-by: ssadetsky, serb
This commit is contained in:
parent
b3ad5b94c3
commit
abaaf58cf3
@ -30,6 +30,9 @@ import java.awt.Image;
|
|||||||
import java.awt.Toolkit;
|
import java.awt.Toolkit;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.LinkOption;
|
||||||
|
import java.nio.file.Path;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
|
||||||
@ -243,7 +246,8 @@ public abstract class ShellFolder extends File {
|
|||||||
if (file instanceof ShellFolder) {
|
if (file instanceof ShellFolder) {
|
||||||
return (ShellFolder)file;
|
return (ShellFolder)file;
|
||||||
}
|
}
|
||||||
if (!file.exists()) {
|
|
||||||
|
if (!Files.exists(file.toPath(), LinkOption.NOFOLLOW_LINKS)) {
|
||||||
throw new FileNotFoundException();
|
throw new FileNotFoundException();
|
||||||
}
|
}
|
||||||
return shellFolderManager.createShellFolder(file);
|
return shellFolderManager.createShellFolder(file);
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* @test
|
/* @test
|
||||||
@bug 8017487
|
@bug 8017487 8167988
|
||||||
@summary filechooser in Windows-Libraries folder: columns are mixed up
|
@summary filechooser in Windows-Libraries folder: columns are mixed up
|
||||||
@author Semyon Sadetsky
|
@author Semyon Sadetsky
|
||||||
@modules java.desktop/sun.awt.shell
|
@modules java.desktop/sun.awt.shell
|
||||||
|
Loading…
x
Reference in New Issue
Block a user