On Fri, 11 Nov 2022 08:18:19 GMT, Tejesh R <[email protected]> wrote:

> Observation found when JFileChooser is instantiated in WindowsLookAndFeel 
> which invokes getSystemIcon() from WindowsFileChooserUI class. Could not find 
> the exact root cause so predicting it to be an issue with icons not loaded 
> where resolutionVariants map is empty in _public Image 
> getResolutionVariant(double width, double height) _. Hence proposing a null 
> check before accessing getWidth(). Fix is tested in CI system.

> 

Yeah, the only way the retVal can become null would-be if `resolutionVariants` 
doesn't have an Icon. I could not reproduce the bug since it is intermittent, I 
came to this conclusion only by code analysis though. Should I check for 
`resolutionVariants` if its empty and return null without proceeding 
further......? I guess both the ways `null` will be returned?

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

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

Reply via email to