RFR: 8287148: Avoid redundant HashMap.containsKey calls in ExtendedKeyCodes.getExtendedKeyCodeForChar
Patrick Chen
chen.j.patrick at gmail.com
Mon May 23 09:13:35 UTC 2022
"It's clearer and a bit faster." yeah totally agree
Le lun. 23 mai 2022 à 11:03, Andrey Turbanov <aturbanov at openjdk.java.net> a
écrit :
> `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.
>
> -------------
>
> Commit messages:
> - [PATCH] Avoid redundant HashMap.containsKey calls in ExtendedKeyCodes
>
> Changes: https://git.openjdk.java.net/jdk/pull/8489/files
> Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8489&range=00
> Issue: https://bugs.openjdk.java.net/browse/JDK-8287148
> Stats: 18 lines in 1 file changed: 3 ins; 5 del; 10 mod
> Patch: https://git.openjdk.java.net/jdk/pull/8489.diff
> Fetch: git fetch https://git.openjdk.java.net/jdk
> pull/8489/head:pull/8489
>
> PR: https://git.openjdk.java.net/jdk/pull/8489
>
More information about the client-libs-dev
mailing list