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

Phil Race prr at openjdk.java.net
Thu May 27 00:22:14 UTC 2021


On Wed, 26 May 2021 21:37:44 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

>> test/jdk/javax/swing/JFileChooser/FileSystemView/SystemIconTest.java line 77:
>> 
>>> 75:         int[] sizes = new int[] {16, 32, 48, 64, 128};
>>> 76:         for (int size : sizes) {
>>> 77:             ImageIcon icon = (ImageIcon) fsv.getSystemIcon(file, size, size);
>> 
>> Is this cast allowed without instanceof check?
>
> On Windows - yes. When implementation is complete on other platforms test will have to be updated depending on the way it will be implemented there.

Hmm .. I focused too much on the spec it seems. The API returns Icon and the test should not
"know" or depend on it being anything more specific.
Why does it need to do this ?

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

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


More information about the awt-dev mailing list