On Thu, 1 Jul 2021 17:09:06 GMT, Alexander Zuev <kiz...@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

Reply via email to