<Swing Dev> [jdk17] RFR: 8269269: [macos11] SystemIconTest fails with ClassCastException [v2]

Sergey Bylokhov serb at openjdk.java.net
Thu Jul 1 17:17:00 UTC 2021


On Thu, 1 Jul 2021 17:09:06 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

>> That test was not marked as headful because this API should work in the headless environment as well, if it does not work when we have a bug in the shell classes which should return the icon from the UIManager on any error. I think it worked as expected.
>> 
>> As far as I understand when we cannot access the image of some specific file we tried to get a generic image via shell32.dll, does it fail as well? Is it possible that when we try to create the failback icon here:
>> https://github.com/openjdk/jdk/blob/82bfc5d45c54fb37dc021bc91fa17efe34f77f44/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolder2.java#L1199
>> we get the icon of the correct size and skip the creation of "MultiResolutionIconImage"? As a result, the test fails because the icon is not multi-resolution.
>
>> we get the icon of the correct size and skip the creation of "MultiResolutionIconImage"? As a result, the test fails because the icon is not multi-resolution.
> 
> Well, it might be this case sometimes but in the case when i was able to reproduce this issue it was null coming from native code so we were falling back to UIManager. I can enforce MRI creation even if size is correct - but again, the method signature does not promise the MRI in all cases so we might just modify the test case to not expect the MRI as granted even for the well-known files.

When in what line of code we got a null from the native code so the UIManager was used?

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

PR: https://git.openjdk.java.net/jdk17/pull/178


More information about the swing-dev mailing list