On Wed, 26 May 2021 21:37:44 GMT, Alexander Zuev <kiz...@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

Reply via email to