jmockit / jmockit1

Advanced Java library for integration testing, mocking, faking, and code coverage
Other
465 stars 240 forks source link

java.lang.ClassCircularityError when doing callpoints #330

Closed brucetrask closed 8 years ago

brucetrask commented 8 years ago

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)

brucetrask commented 8 years ago

I should mention that the MyClass mentioned above does have a rather comlex (but valid) hierarchy.