[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dava and array creation.




Dava seems to deal with some new arrays incorrectly if the type is itself an array.
I think the right thing is to put a special case in Dava/javaRep/DNewArray.java for creating array types.


public class Main {
    public static void main(String args[]) {
        int[][] foo = new int[3][];
    }
}

after decompiling:

public class Main
{

    public Main()
    {
        super();

        return;
    }

    public static void main(java.lang.String[] r0)
    {
        int[][] r1;

        r1 = new int[][3];
        return;
    }
}

And the jimple:

public class Main extends java.lang.Object
{

    public void <init>()
    {
        Main r0;

        r0 := @this;
        specialinvoke r0.<init>();
        return;
    }

    public static void main(java.lang.String[])
    {
        java.lang.String[] r0;
        int[][] r1;

        r0 := @parameter0;
        r1 = newarray (int[])[3];
        return;
    }
}