Closed jrfaller closed 2 years ago
Hi!
When trying to analyze a project of mine I run over a StackOverflow exception. Here is the config:
StackOverflow
I think I have managed to devise a test case that reproduces the problem, as follows:
@Test public void testStackOverflow() throws Exception { JarArchiveComparatorOptions jarArchiveComparatorOptions = new JarArchiveComparatorOptions(); jarArchiveComparatorOptions.setAccessModifier(AccessModifier.PRIVATE); List<JApiClass> jApiClasses = ClassesHelper.compareClasses(jarArchiveComparatorOptions, new ClassesHelper.ClassesGenerator() { @Override public List<CtClass> createOldClasses(ClassPool classPool) throws Exception { CtClass superInterface = CtInterfaceBuilder.create().name("I").addToClassPool(classPool); CtMethodBuilder.create().returnType(CtClass.voidType).publicAccess().abstractMethod().name("method").addToClass(superInterface); CtClass subClass = CtClassBuilder.create().name("C").implementsInterface(superInterface).addToClassPool(classPool); return Arrays.asList(superInterface, subClass); } @Override public List<CtClass> createNewClasses(ClassPool classPool) throws Exception { CtClass superInterface = CtInterfaceBuilder.create().name("C").addToClassPool(classPool); CtMethodBuilder.create().returnType(CtClass.voidType).publicAccess().abstractMethod().name("method").addToClass(superInterface); CtClass subClass = CtClassBuilder.create().name("I").implementsInterface(superInterface).addToClassPool(classPool); return Arrays.asList(superInterface, subClass); } }); JApiClass jApiClass = getJApiClass(jApiClasses, "I"); JApiMethod jApiMethod = getJApiMethod(jApiClass.getMethods(), "method"); }
Cheers!
Fixed: 0.15.5
Awesome, thanks a lot!!
Hi!
When trying to analyze a project of mine I run over a
StackOverflow
exception. Here is the config:I think I have managed to devise a test case that reproduces the problem, as follows:
Cheers!