RFR: 8274319: Replace usages of Collections.sort with List.sort call in jdk.jfr
Andrey Turbanov
github.com+741251+turbanoff at openjdk.java.net
Sat Sep 25 11:18:06 UTC 2021
Collections.sort is just a wrapper, so it is better to use an instance method directly.
Also Comparator's implementation can be cleaned up with help of static methods in `Comparator` class.
E.g `(u, v) -> Long.compare(v.count, u.count)` can be replaced with `Comparator.comparingLong(v -> v.count)`
-------------
Commit messages:
- 8274319: Replace usages of Collections.sort with List.sort call in jdk.jfr
Changes: https://git.openjdk.java.net/jdk/pull/5696/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5696&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8274319
Stats: 29 lines in 10 files changed: 1 ins; 10 del; 18 mod
Patch: https://git.openjdk.java.net/jdk/pull/5696.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/5696/head:pull/5696
PR: https://git.openjdk.java.net/jdk/pull/5696
More information about the hotspot-jfr-dev
mailing list