`Map.containsKey` call is sometimes unnecessary, when it's known that `Map` doesn't contain `null` values. Instead of pair containsKey+put we can use putIfAbsent and compare result with null. Result code is shorter and a bit faster.
------------- Commit messages: - [PATCH] Avoid redundant HashMap.containsKey call in ModuleDescriptor Changes: https://git.openjdk.org/jdk/pull/13288/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13288&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8305538 Stats: 9 lines in 1 file changed: 0 ins; 2 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/13288.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/13288/head:pull/13288 PR: https://git.openjdk.org/jdk/pull/13288