[
https://issues.apache.org/jira/browse/BCEL-276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15818938#comment-15818938
]
Mark Roberts commented on BCEL-276:
-----------------------------------
I was able to get the code working to pass both your tests and my tests, but
there were two issues that needed to be fixed. First, when copying the
LocalVariableTypeTable, you need to make a true copy, not just save the
pointer. Approx line 229. The other change is more complex. You cannot match a
LocalVariable and a LocalVariableType based on having the same index and it may
have been modified. I Added code to LocalVariable.java and
LocalVariableGen.java to maintain a copy of the original index of a
LocalVariable and then use this for matching.
I have attached three diff files with my changes.
> 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, MethodGen.diff,
> 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)