[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bcel-dev
Subject:    DO NOT REPLY [Bug 45217] MethodGen: LocalVariableTableGen issues
From:       bugzilla () apache ! org
Date:       2008-06-16 20:22:09
Message-ID: 20080616202209.E41A0234C142 () brutus ! apache ! org
[Download RAW message or body]

https://issues.apache.org/bugzilla/show_bug.cgi?id=45217





--- Comment #2 from Matthew Wilson <mj.wilson.uk@googlemail.com>  2008-06-16 13:22:09 PST ---
The issue is here, AFAICT, in the constructor of MethodGen:


...
                    } else if (a instanceof LocalVariableTable) {
                        LocalVariable[] lv = ((LocalVariableTable)
a).getLocalVariableTable();
                        removeLocalVariables();
                        // [snip]
                    } else if (a instanceof LocalVariableTypeTable) {
                        LocalVariable[] lv = ((LocalVariableTypeTable)
a).getLocalVariableTypeTable();
                        removeLocalVariables();
...

It fills in the local variables from the LocalVariableTypeTable as well, but
removes the variables declared in LocalVariableTable.  Since the
LocalVariableTypeTable only includes variables with generics (or so it seems
that Eclipse's compiler does that), the other variables are removed.  It should
be fairly safe to remove that 'removeLocalVariables()' call.

The other part of the issue is Type.getType(String) not parsing the generic
types correctly.  I'm not sure what the best thing to do is there, though.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic