What steps will reproduce the problem?
1. Use Java 1.6, Groovy 2.1.9, and gprof 0.3.0-groovy-2.1
2. Run this code:
profile {
(1..100).each {
it * it
}
}.prettyPrint()
3. You'll get this stack dump:
java.lang.NoSuchMethodError: java.lang.Long.compare(JJ)I
at groovyx.gprof.flat.FlatReportNormalizer$MethodElementComparator.compare(FlatReportNormalizer.java:130)
at groovyx.gprof.flat.FlatReportNormalizer$MethodElementComparator.compare(FlatReportNormalizer.java:126)
at java.util.Arrays.mergeSort(Arrays.java:1270)
at java.util.Arrays.sort(Arrays.java:1210)
at java.util.Collections.sort(Collections.java:157)
at groovyx.gprof.flat.FlatReportNormalizer$1.exit(FlatReportNormalizer.java:46)
at groovyx.gprof.CallTree.visit(CallTree.java:33)
at groovyx.gprof.flat.FlatReportNormalizer.normalize(FlatReportNormalizer.java:33)
at groovyx.gprof.flat.FlatReport.prettyPrint(FlatReport.java:39)
at groovyx.gprof.ProxyReport.prettyPrint(ProxyReport.java:39)
at groovyx.gprof.Report.prettyPrint(Report.java:35)
at groovyx.gprof.Report.prettyPrint(Report.java:31)
at groovyx.gprof.Report$prettyPrint.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at com.tendril.her.qc.ProfilerTest.minimalTest(ProfilerTest.groovy:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
What is the expected output? What do you see instead?
I expected no exception.
What version of the product are you using? On what operating system?
Running on a Mac running OS X 10.8.5
Please provide any additional information below.
Original issue reported on code.google.com by BillWright510 on 18 Jun 2014 at 7:58
Original issue reported on code.google.com by
BillWright510
on 18 Jun 2014 at 7:58