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

Aleksey Shipilev shade at openjdk.java.net
Thu Feb 18 13:18:06 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.

Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:

  Compare actual negative instead of -1

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

Changes:
  - all: https://git.openjdk.java.net/jmh/pull/21/files
  - new: https://git.openjdk.java.net/jmh/pull/21/files/ccf7d283..51973f37

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jmh&pr=21&range=03
 - incr: https://webrevs.openjdk.java.net/?repo=jmh&pr=21&range=02-03

  Stats: 6 lines in 2 files changed: 0 ins; 0 del; 6 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