changeset 1245:4863dfc3e61e

Make JMH compilable with JDK 6 again.
author shade
date Wed, 24 Jun 2015 13:55:10 +0300
parents 7f20879715eb
children 9440a466ee8c
files jmh-core/src/main/java/org/openjdk/jmh/profile/AbstractPerfAsmProfiler.java
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/AbstractPerfAsmProfiler.java	Wed Jun 24 12:24:16 2015 +0300
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/AbstractPerfAsmProfiler.java	Wed Jun 24 13:55:10 2015 +0300
@@ -894,9 +894,13 @@
 
         @Override
         public int compareTo(Interval o) {
-            int c1 = Long.compare(src, o.src);
-            if (c1 != 0) return c1;
-            return Long.compare(dst, o.dst);
+            if (src < o.src) {
+                return -1;
+            } else if (src > o.src) {
+                return 1;
+            } else {
+                return (dst < o.dst) ? -1 : ((dst == o.dst) ? 0 : 1);
+            }
         }
     }