RFR: 8287148: Avoid redundant HashMap.containsKey calls in ExtendedKeyCodes.getExtendedKeyCodeForChar
Andrey Turbanov
aturbanov at openjdk.java.net
Tue Jun 7 19:42:52 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.
Thank you for review!
-------------
PR: https://git.openjdk.java.net/jdk/pull/8489
More information about the client-libs-dev
mailing list