`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

Reply via email to