Description of the problem or enhancement request:
I see a java.lang.ClassCircularityError when I have callpoints enabled. Not sure what exactly is triggering it in the code. I understand there are sometimes some hierarchied that cause this even though the tests run fine by themselves or without callpoints. Any more insights into this one? StackTrace below.
java.lang.ClassCircularityError: a/b/c/c/MyClass
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at mockit.coverage.CallPoint.findMethod(CallPoint.java:169)
at mockit.coverage.CallPoint.isTestMethod(CallPoint.java:140)
at mockit.coverage.CallPoint.create(CallPoint.java:105)
at mockit.coverage.TestRun.lineExecuted(TestRun.java:30)
at a.b.c.d.OtherClass.(ObjectPool.java:8)
at a.b.c.d.AnotherClass.(SingleOrder.java:971)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at mockit.internal.util.ClassLoad.loadClass(ClassLoad.java:102)
at mockit.internal.util.ClassLoad.loadClass(ClassLoad.java:54)
at mockit.internal.util.ClassLoad.loadByInternalName(ClassLoad.java:31)
at mockit.internal.util.ClassLoad.getSuperClass(ClassLoad.java:146)
at mockit.internal.util.ClassLoad.actualSuperClass(ClassLoad.java:177)
at mockit.internal.util.ClassLoad.whichIsSuperClass(ClassLoad.java:161)
at mockit.external.asm.ClassWriter.getCommonSuperClass(ClassWriter.java:1694)
at mockit.external.asm.ClassWriter.getMergedType(ClassWriter.java:1661)
at mockit.external.asm.Frame.merge(Frame.java:1428)
at mockit.external.asm.Frame.merge(Frame.java:1327)
at mockit.external.asm.MethodWriter.visitMaxs(MethodWriter.java:1475)
at mockit.external.asm.MethodVisitor.visitMaxs(MethodVisitor.java:785)
at mockit.external.asm.ClassReader.readCode(ClassReader.java:1546)
at mockit.external.asm.ClassReader.readMethod(ClassReader.java:1009)
at mockit.external.asm.ClassReader.accept(ClassReader.java:687)
at mockit.external.asm.ClassReader.accept(ClassReader.java:501)
at mockit.coverage.modification.ClassModification.modifyClassForCoverage(ClassModification.java:142)
at mockit.coverage.modification.ClassModification.modifyClassForCoverage(ClassModification.java:217)
at mockit.coverage.modification.ClassModification.modifyClass(ClassModification.java:192)
at mockit.coverage.CodeCoverage.transform(CodeCoverage.java:130)
Please provide the following information:
java.lang.ClassCircularityError: a/b/c/c/MyClass at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.getDeclaredMethods(Class.java:1975) at mockit.coverage.CallPoint.findMethod(CallPoint.java:169) at mockit.coverage.CallPoint.isTestMethod(CallPoint.java:140) at mockit.coverage.CallPoint.create(CallPoint.java:105) at mockit.coverage.TestRun.lineExecuted(TestRun.java:30) at a.b.c.d.OtherClass.(ObjectPool.java:8)
at a.b.c.d.AnotherClass.(SingleOrder.java:971)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at mockit.internal.util.ClassLoad.loadClass(ClassLoad.java:102)
at mockit.internal.util.ClassLoad.loadClass(ClassLoad.java:54)
at mockit.internal.util.ClassLoad.loadByInternalName(ClassLoad.java:31)
at mockit.internal.util.ClassLoad.getSuperClass(ClassLoad.java:146)
at mockit.internal.util.ClassLoad.actualSuperClass(ClassLoad.java:177)
at mockit.internal.util.ClassLoad.whichIsSuperClass(ClassLoad.java:161)
at mockit.external.asm.ClassWriter.getCommonSuperClass(ClassWriter.java:1694)
at mockit.external.asm.ClassWriter.getMergedType(ClassWriter.java:1661)
at mockit.external.asm.Frame.merge(Frame.java:1428)
at mockit.external.asm.Frame.merge(Frame.java:1327)
at mockit.external.asm.MethodWriter.visitMaxs(MethodWriter.java:1475)
at mockit.external.asm.MethodVisitor.visitMaxs(MethodVisitor.java:785)
at mockit.external.asm.ClassReader.readCode(ClassReader.java:1546)
at mockit.external.asm.ClassReader.readMethod(ClassReader.java:1009)
at mockit.external.asm.ClassReader.accept(ClassReader.java:687)
at mockit.external.asm.ClassReader.accept(ClassReader.java:501)
at mockit.coverage.modification.ClassModification.modifyClassForCoverage(ClassModification.java:142)
at mockit.coverage.modification.ClassModification.modifyClassForCoverage(ClassModification.java:217)
at mockit.coverage.modification.ClassModification.modifyClass(ClassModification.java:192)
at mockit.coverage.CodeCoverage.transform(CodeCoverage.java:130)