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

Sergey Bylokhov serb at openjdk.java.net
Wed May 26 21:42:18 UTC 2021


On Wed, 26 May 2021 16:52:38 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

>> Fix updated after first round of review.
>
> Alexander Zuev has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Fixed small errors
>    Adjustments in the test
>  - Grammar fix in method documentation

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?

test/jdk/javax/swing/JFileChooser/FileSystemView/SystemIconTest.java line 87:

> 85:             }
> 86: 
> 87:             if (implComplete && icon.getIconWidth() != size) {

Why the size of the returned images might be different? The spec state the size parameter in the getSystemIcon is the size of the icon in the userspace.

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

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


More information about the awt-dev mailing list