We can use `Comparator.naturalOrder()` for cases when a `TreeMap` instance is constructed without comparator. This allows to squash two branches in `TreeMap.get()` into one.
P.S. I think the comment of `TreeMap.getEntryUsingComparator()` is outdated. Should we also change it? ------------- Commit messages: - Merge remote-tracking branch 'origin/tree-map-simpl' into tree-map-simpl - Simplify TreeMap.get() with Comparator.naturalOrder() - Merge branch 'master' into tree-map-simpl - Simplify TreeMap.get() with Comparator.naturalOrder() Changes: https://git.openjdk.org/jdk/pull/9901/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9901&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8293630 Stats: 45 lines in 1 file changed: 6 ins; 22 del; 17 mod Patch: https://git.openjdk.org/jdk/pull/9901.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9901/head:pull/9901 PR: https://git.openjdk.org/jdk/pull/9901