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

Mantas Balnys commented on BCEL-158:
------------------------------------

I've added a fix in Type.getType(String signature) method to remove all 
generics information.


                int index = signature.indexOf('<'); // Look for generics and 
ignore it;
                if (index < 0) {
                        index = signature.indexOf(';'); // Look for closing ';'
                        if (index < 0) {
                                throw new ClassFormatException("Invalid 
signature: " + signature);
                        }
                }
                else if (index == 0) {
                        throw new ClassFormatException("Invalid signature: " + 
signature);
                }



Could this be a bug fix?

Note that there is same code in 
"org.apache.bcel.classfile.Utility.signatureToString( String signature, boolean 
chopit )"
                
> Eclipse debugger fails on BCEL-instrumented methods having generic local 
> variables.
> -----------------------------------------------------------------------------------
>
>                 Key: BCEL-158
>                 URL: https://issues.apache.org/jira/browse/BCEL-158
>             Project: Commons BCEL
>          Issue Type: Bug
>          Components: Main
>    Affects Versions: unspecified
>         Environment: Operating System: All
> Platform: PC
>            Reporter: Byron Hawkins
>            Assignee: Apache Commons Developers
>
> When any method is instrumented with BCEL to include additional constants, 
> and the method was originally compiled with local variables that have generic 
> arguments, the method is no longer viewable in the Eclipse debugger. For 
> these methods, it complains "com.sun.jdi.InternalException: Got error code in 
> reply:35 occurred retrieving 'this' from stack frame." It sounds like the 
> local variable table is somehow not compatible with the debugger, even if the 
> instrumentation activity did not touch the generic local variables. 
> I'm currently using the 6.0-20110805.040858-2 snapshot. Please let me know if 
> there is any workaround. Thanks!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to