> 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?
Sergey Tsypanov has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision: - Merge branch 'master' into tree-map-simpl - 8293630: Inline natural() - Update src/java.base/share/classes/java/util/TreeMap.java Co-authored-by: ExE Boss <3889017+exe-b...@users.noreply.github.com> - Update src/java.base/share/classes/java/util/TreeMap.java Co-authored-by: ExE Boss <3889017+exe-b...@users.noreply.github.com> - 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: - all: https://git.openjdk.org/jdk/pull/9901/files - new: https://git.openjdk.org/jdk/pull/9901/files/ae6e2320..ca1d40b6 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9901&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9901&range=03-04 Stats: 529520 lines in 6935 files changed: 265880 ins; 185707 del; 77933 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