<Swing Dev> [jdk17] RFR: 8269269: [macos11] SystemIconTest fails with ClassCastException
Alexander Zuev
kizune at openjdk.java.net
Tue Jun 29 19:57:03 UTC 2021
On Tue, 29 Jun 2021 19:11:32 GMT, Alexander Zuev <kizune at openjdk.org> wrote:
> 8268280: javax/swing/JFileChooser/FileSystemView/SystemIconTest.java fails on windows
test/jdk/javax/swing/JFileChooser/FileSystemView/SystemIconTest.java line 75:
> 73: static void testSystemIcon(File file, boolean implComplete) {
> 74: int[] sizes = new int[] {16, 32, 48, 64, 128};
> 75: if (!file.exists() || !file.canRead()) {
The main reason for the Windows failure is that for some reason the default windir was not accessible - this check will avoid the situation where we are testing the icon for non-accessible folder - because in this case we will return the default UIManager icon for a file or a folder and this icon is not multi-resolution. On Mac it leads to the IconUIResource being returned and this Icon representation can not be casted to ImageIcon hence test fails.
-------------
PR: https://git.openjdk.java.net/jdk17/pull/176
More information about the swing-dev
mailing list