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.

Based on the analysis and test runs, I have added a null check to return null 
when _ImageIcon_ is null and added to the map. The test is made as headful 
since the occurrence of issue seems to be dependent on machine and is 
unpredictable. Headful test didn't cause any issue after multiple runs and 
iterations.

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

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

Reply via email to