RFR: CODETOOLS-7902829: JMH Statistics implementations do not follow Comparable spec

Aleksey Shipilev shade at openjdk.java.net
Thu Feb 18 11:17:59 UTC 2021


`Comparable.compareTo` spec says: "Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object."

Unfortunately, that is not followed by JMH Statistics, because they get the order wrong. The tests that are supposed to catch this are also wrong.

-------------

Commit messages:
 - CODETOOLS-7902829: JMH Statistics implementations do not follow Comparable spec

Changes: https://git.openjdk.java.net/jmh/pull/21/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jmh&pr=21&range=00
  Issue: https://bugs.openjdk.java.net/browse/CODETOOLS-7902829
  Stats: 7 lines in 3 files changed: 0 ins; 0 del; 7 mod
  Patch: https://git.openjdk.java.net/jmh/pull/21.diff
  Fetch: git fetch https://git.openjdk.java.net/jmh pull/21/head:pull/21

PR: https://git.openjdk.java.net/jmh/pull/21


More information about the jmh-dev mailing list