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.io.*;
|
||||
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.concurrent.Callable;
|
||||
|
||||
@ -243,7 +246,8 @@ public abstract class ShellFolder extends File {
|
||||
if (file instanceof ShellFolder) {
|
||||
return (ShellFolder)file;
|
||||
}
|
||||
if (!file.exists()) {
|
||||
|
||||
if (!Files.exists(file.toPath(), LinkOption.NOFOLLOW_LINKS)) {
|
||||
throw new FileNotFoundException();
|
||||
}
|
||||
return shellFolderManager.createShellFolder(file);
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
|
||||
/* @test
|
||||
@bug 8017487
|
||||
@bug 8017487 8167988
|
||||
@summary filechooser in Windows-Libraries folder: columns are mixed up
|
||||
@author Semyon Sadetsky
|
||||
@modules java.desktop/sun.awt.shell
|
||||
|
Loading…
Reference in New Issue
Block a user