PAMunb / JimpleFramework

A Rascal implementation of the Jimple framework.
13 stars 5 forks source link

Error Error in Decompiler class when processing for loop over an interface (collection) #10

Closed phtcosta closed 4 years ago

phtcosta commented 4 years ago

Sample code to reproduce the error:

public class TestClass {
    public void D() {   
        List<String> list = List.of("a","b","c","d");
        for(int i=0; i < list.size(); i++) {
            log("Executing D: "+list.get(i));
        }
    }

        static void log(String message) {
        System.out.println(message);
    }
}

Error message:

java.lang.StackOverflowError
    at lang.jimple.internal.JimpleObjectFactory.type(JimpleObjectFactory.java:107)
    at lang.jimple.internal.JimpleObjectFactory.type(JimpleObjectFactory.java:127)
    at lang.jimple.internal.JimpleObjectFactory.type(JimpleObjectFactory.java:127)
    at lang.jimple.internal.JimpleObjectFactory.type(JimpleObjectFactory.java:127)
    at lang.jimple.internal.JimpleObjectFactory.type(JimpleObjectFactory.java:127)