RFR: 6753661: JFileChooser font not reset after Look & Feel change [v5]
    Prasanta Sadhukhan 
    psadhukhan at openjdk.org
       
    Fri Feb 10 11:47:51 UTC 2023
    
    
  
On Thu, 9 Feb 2023 20:45:58 GMT, Alexey Ivanov <aivanov at 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
    
    
More information about the client-libs-dev
mailing list