[abc] RE: NPE in coffie

From: Eric Bodden <eric.bodden@mail.mcgill.ca>
Date: Thu Jan 19 2006 - 05:00:50 GMT

Sorry, forgot to paste the method body:

    private void adjustLineNumberTable()
    {
        if (!Options.v().keep_line_number())
            return;
        if (method.code_attr == null)
            return;

        attribute_info[] attributes = method.code_attr.attributes;

        for (int i=0; i<attributes.length; i++)
        {
            if (attributes[i] instanceof LineNumberTable_attribute)
            {
                LineNumberTable_attribute lntattr =
                    (LineNumberTable_attribute)attributes[i];
                for (int j=0; j<lntattr.line_number_table.length; j++)
                {
                    Instruction oldinst =
                        lntattr.line_number_table[j].start_inst;
// ########## "oldinst" is null in the next line!!!
                    Instruction newinst =
                                (Instruction)replacedInsns.get(oldinst);
                    if (newinst != null)
                        lntattr.line_number_table[j].start_inst =
newinst;
                }
            }
        }
    }
Received on Thu Jan 19 05:00:50 2006

This archive was generated by hypermail 2.1.8 : Thu Jan 19 2006 - 06:30:09 GMT