jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java
equal
deleted
inserted
replaced
1020 |
1020 |
1021 boolean useShellFolder = FilePane.usesShellFolder(chooser); |
1021 boolean useShellFolder = FilePane.usesShellFolder(chooser); |
1022 |
1022 |
1023 directories.clear(); |
1023 directories.clear(); |
1024 |
1024 |
1025 File[] baseFolders; |
1025 File[] baseFolders = (useShellFolder) |
1026 if (useShellFolder) { |
1026 ? (File[]) ShellFolder.get("fileChooserComboBoxFolders") |
1027 baseFolders = AccessController.doPrivileged(new PrivilegedAction<File[]>() { |
1027 : fsv.getRoots(); |
1028 public File[] run() { |
|
1029 return (File[]) ShellFolder.get("fileChooserComboBoxFolders"); |
|
1030 } |
|
1031 }); |
|
1032 } else { |
|
1033 baseFolders = fsv.getRoots(); |
|
1034 } |
|
1035 directories.addAll(Arrays.asList(baseFolders)); |
1028 directories.addAll(Arrays.asList(baseFolders)); |
1036 |
1029 |
1037 // Get the canonical (full) path. This has the side |
1030 // Get the canonical (full) path. This has the side |
1038 // benefit of removing extraneous chars from the path, |
1031 // benefit of removing extraneous chars from the path, |
1039 // for example /foo/bar/ becomes /foo/bar |
1032 // for example /foo/bar/ becomes /foo/bar |