Integrated: 8287148: Avoid redundant HashMap.containsKey calls in ExtendedKeyCodes.getExtendedKeyCodeForChar
Andrey Turbanov
aturbanov at openjdk.java.net
Tue Jun 7 19:42:53 UTC 2022
On Sat, 30 Apr 2022 18:58:56 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
> `sun.awt.ExtendedKeyCodes#regularKeyCodesMap` contains only non-null values. It means we can replace containsKey+get with get+null check.
> It's clearer and a bit faster.
This pull request has now been integrated.
Changeset: 1aa87e00
Author: Andrey Turbanov <aturbanov at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/1aa87e0078765480bc7805e95b747addaf993cf6
Stats: 18 lines in 1 file changed: 3 ins; 5 del; 10 mod
8287148: Avoid redundant HashMap.containsKey calls in ExtendedKeyCodes.getExtendedKeyCodeForChar
Reviewed-by: prr
-------------
PR: https://git.openjdk.java.net/jdk/pull/8489
More information about the client-libs-dev
mailing list