Integrated: 8354789: Unnecessary null check in sun.awt.windows.WToolkit.getFontPeer

Andrey Turbanov aturbanov at openjdk.org
Thu Apr 17 19:22:49 UTC 2025


On Thu, 16 Jan 2025 12:03:50 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:

> There is redundant `null` comparison in `sun.awt.windows.WToolkit.getFontPeer`
> Local variable `retval` can't be null after new object assignment.
> https://github.com/openjdk/jdk/blob/24de9dee80738fe6ab1fc726b071546c85bbf79a/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java#L604-L605

This pull request has now been integrated.

Changeset: 1b4b317a
Author:    Andrey Turbanov <aturbanov at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/1b4b317aacbdfc499c28b00aeaf7120790a6c11a
Stats:     13 lines in 1 file changed: 0 ins; 2 del; 11 mod

8354789: Unnecessary null check in sun.awt.windows.WToolkit.getFontPeer

Reviewed-by: aivanov, tr

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

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


More information about the client-libs-dev mailing list