[ 
https://issues.apache.org/jira/browse/BCEL-276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15484587#comment-15484587
 ] 

Mark Roberts commented on BCEL-276:
-----------------------------------

This issue needs to be reopened as the code is incorrect.  It saves a copy of 
the LocalVariableTable and then reuses it later.  But that is obviously 
incorrect as any changes that have been made to the LocalVariableTable in the 
meantime are discarded.  I have attached a diff file with the changes I made to 
correct the problem.  Unfortunately, that broke the new associated test case 
for reasons I could not understand.  The original patch developer will need to 
review the situation.  The key point is the change at line 622 where we get the 
latest copy of the LocalVariableTable - not some previously cached version.

Note that I also added a couple of minimal routines that allow a user to get a 
copy of or delete the LocalVariableTypeTable.  This is necessary if you make 
major changes to the LocalVariableTable (such as changing the slot number) so 
that the two tables cannot be resynchronized.  BCEL should take care of all of 
this automatically, but as we all know the support in this area and in the 
StackMapTable area is lacking.



> LocalVariableTypeTable is not updated. 
> ---------------------------------------
>
>                 Key: BCEL-276
>                 URL: https://issues.apache.org/jira/browse/BCEL-276
>             Project: Commons BCEL
>          Issue Type: Bug
>    Affects Versions: 6.0
>            Reporter: Sam Yoon
>            Assignee: Benedikt Ritter
>              Labels: github
>             Fix For: 6.1
>
>         Attachments: LocalVariableTypeTableTest.java, 
> SimpleClassHasMethodIncludeGenericArgument.java
>
>
> If a method for BCI have at least one generic type of argument JVM throw 
> java.lang.ClassFormatError due to not updated LocalVariableTable.
> I know there is workaround as call removeLocalVariables method.
> But I think it's better that BCEL can stay proper LocalVariableTable.
> I'm also pull test case can reproduce error.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to