8182041: File Chooser Shortcut Panel folders under on JDK 9 8062648: FileSystemView.getDefaultDirectory() should check read access on Unix systems

Reviewed-by: serb, prr, psadhukhan
This commit is contained in:
Krishna Addepalli 2018-10-05 14:35:24 +05:30
parent fc807d0914
commit 995f6963b3
6 changed files with 154 additions and 21 deletions

View file

@ -583,18 +583,29 @@ public abstract class FileSystemView {
}
/**
* Returns an array of files representing the values to show by default in
* the file chooser selector.
* Returns an array of files representing the values which will be shown
* in the file chooser selector.
*
* @return an array of {@code File} objects.
* @throws SecurityException if the caller does not have necessary
* permissions
* @return an array of {@code File} objects. The array returned may be
* possibly empty if there are no appropriate permissions.
* @since 9
*/
public File[] getChooserComboBoxFiles() {
return (File[]) ShellFolder.get("fileChooserComboBoxFolders");
}
/**
* Returns an array of files representing the values to show by default in
* the file chooser shortcuts panel.
*
* @return an array of {@code File} objects. The array returned may be
* possibly empty if there are no appropriate permissions.
* @since 12
*/
final public File[] getChooserShortcutPanelFiles() {
return (File[]) ShellFolder.get("fileChooserShortcutPanelFolders");
}
/**
* Returns whether the specified file denotes a shell interpreted link which
* can be obtained by the {@link #getLinkLocation(File)}.