RFR: 8377183: Impossible or redundant condition in AwtFrame::_NotifyModalBlocked of awt_Frame.cpp:1635
Damon Nguyen
dnguyen at openjdk.org
Mon Feb 9 22:00:02 UTC 2026
On Mon, 9 Feb 2026 19:34:42 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> In awt_Frame.cpp, there is a conditional that includes a "not-null" check in a scenario where null is impossible. Starting on line 1589, each conditional ends in a return statement. The only possibility in awt_Frame.cpp's line 1635 is peer is not null and f is not null. So, checking for `f != NULL` is redundant and unnecessary. And the fix is simply to remove this extraneous check in the conditional.
>
> src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp line 1635:
>
>> 1633: }
>> 1634:
>> 1635: if (::IsWindow(f->GetHWnd()))
>
> please update the copyright year
Thanks! Updated.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29625#discussion_r2784283617
More information about the client-libs-dev
mailing list