On Thu, 9 Feb 2023 20:45:58 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Update test
>
> test/jdk/javax/swing/JFileChooser/JFileChooserFontReset.java line 69:
> 
>> 67:                     Font curFont = fc.getFont();
>> 68:                     System.out.println("current font " + curFont);
>> 69:                     if (curFont != null && !curFont.equals(origFont)) {
> 
> Is it valid that `currFont` is `null`?
> 
> Do we expect that `origFont.equals(curFont)` returns `true`? And I assume 
> `origFont` shouldn't be `null` either. So the condition could be simplified to
> 
> Suggestion:
> 
>                     if (!origFont.equals(curFont)) {

In few cases, origFont is null. I am not sure if it's a bug or not but this 
issue is about L&F transition does not reset so I only checked current font 
should be same as original font irrespective of it being null or not.

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

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

Reply via email to