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

JLookupSwitchStmt bug?



Hi,

soot.jimple.internal.JLookupSwitchStmt contains these methods:

    public int getLookupValue(int index)
    {
        return ((IntConstant)lookupValues.get(index)).value;
    }

    public void setLookupValue(int index, int value)
    {
        this.lookupValues.set(index, new Integer(value));
    }

It appears that there is confusion about whether the field
'lookupValues' is a List of Integers or a List of IntConstants.

It may not matter if you're just calling 'toString()' but in
general it would be nice for other code to know what to expect
so that it can confidently cast these objects.

Could one or the other be chosen (and that choice documented in Javadoc)?

Thanks,
-Archie

__________________________________________________________________________
Archie Cobbs     *     Packet Design     *     http://www.packetdesign.com