RFR: 8293862: javax/swing/JFileChooser/8046391/bug8046391.java failed with 'Cannot invoke "java.awt.Image.getWidth(java.awt.image.ImageObserver)" because "retVal" is null' [v2]

Tejesh R tr at openjdk.org
Mon Dec 19 13:32:52 UTC 2022


On Mon, 19 Dec 2022 11:49:42 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Tejesh R has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Updated fix
>
> src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolder2.java line 1444:
> 
>> 1442:                 }
>> 1443:             }
>> 1444:             if ((retVal != null) && (retVal.getWidth(null) != w)) {
> 
> I believe this change is not needed.

> You may still add `assert` statements into `MultiResolutionIconImage` constructors which ensures `resolutionVariants` contains no `null` values.

Will add assert statements in this `public MultiResolutionIconImage(int baseSize, Image image)` as null checks are handled in other constructor.

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

PR: https://git.openjdk.org/jdk/pull/11104



More information about the client-libs-dev mailing list