<AWT Dev> RFR: 8182043: Access to Windows Large Icons [v7]

Sergey Bylokhov serb at openjdk.java.net
Thu May 20 07:43:40 UTC 2021


On Mon, 17 May 2021 05:08:13 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

>> src/java.desktop/share/classes/javax/swing/filechooser/FileSystemView.java line 271:
>> 
>>> 269:     * Example: <pre>
>>> 270:     * FileSystemView fsv = FileSystemView.getFileSystemView();
>>> 271:     * Icon icon = fsv.getSystemIcon("application.exe", 64);
>> 
>> Shouldn't the first parameter be a File instance instead of String?
>> `Icon icon = fsv.getSystemIcon(new File("application.exe"), 64);`
>
> Good catch! Yes, fixed both here and in CSR.

Are we sure that all possible paths can be pointed by the file object? Especially some "Windows Libraries" which are accessed by the shell folder?

-------------

PR: https://git.openjdk.java.net/jdk/pull/2875


More information about the awt-dev mailing list