jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java
changeset 28993 7565a4e0f172
parent 28991 c9b7acf9062d
parent 28546 47d9b4eb8fad
child 29894 3e16b51732f5
equal deleted inserted replaced
28992:2479ad7afcdb 28993:7565a4e0f172
  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