Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
BCEL-276 LocalVariableTypeTable is not updated. #12
@garydgregory Unit test class already committed on trunk.
Actually before committed MethodGen.class could passed my unit test.
Please refer https://issues.apache.org/jira/browse/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 a copy of my diff files to https://issues.apache.org/jira/browse/BCEL-276