On Fri, 10 Feb 2023 17:08:34 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>> I dont think it's redundant..There's a || check in between
>> 
>> If `curFont `is not null and `origFont `is null, then 1st condition `curFont 
>> != null && !curFont.equals(origFont)` is satisfied and it will throw 
>> exception
>> 
>> If `origFont `is not null and `curFont `is null, then 1st condition `curFont 
>> != null && !curFont.equals(origFont)` is not satisfied and 2nd condition 
>> `origFont != null && !origFont.equals(curFont)` is satisfied and it will 
>> throw exception. If we remove origFont.equals(curFont) check, it will not 
>> check the fix..
>
> `curFont != origFont && (curFont != null && !curFont.equals(origFont))`
> 
> The first part catches the case where both are null.

ok..modified but I guess mine was not "incorrect" either..

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

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

Reply via email to