On Tue, 4 Feb 2025 13:24:29 GMT, Artem Semenov <[email protected]> wrote:
>> Abhishek Kumar has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Condition evaluation simplified
>
> src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java line 186:
>
>> 184: if (thisRole == AccessibleRole.CHECK_BOX) {
>> 185: if ((newValue != null &&
>> !newValue.equals(oldValue)) ||
>> 186: oldValue != null &&
>> !oldValue.equals(newValue)) {
>
> At first glance, these conditions look like the same thing. equals() above
> will return false if oldValue is null. oldValue.equals(newValue) and
> newValue.equals(oldValue) are also the same thing. Try to rewrite this
> condition more clearly.
I think @savoptik meant that `!oldValue.equals(newValue)` was redundant.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23436#discussion_r1942708541