RFR: 8377183: Impossible or redundant condition in AwtFrame::_NotifyModalBlocked of awt_Frame.cpp:1635

Sergey Bylokhov serb at openjdk.org
Mon Feb 9 21:59:58 UTC 2026


On Mon, 9 Feb 2026 06:26:56 GMT, Damon Nguyen <dnguyen 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

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29625#discussion_r2784189094


More information about the client-libs-dev mailing list