On Sat, 30 Apr 2022 18:58:56 GMT, Andrey Turbanov <aturba...@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 <aturba...@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