Ah fair enough, this was the first place I thought of to mention the
bug.

Thanks
Mac

-----Original Message-----
From: Dave Brosius [mailto:[EMAIL PROTECTED] 
Sent: 23 June 2007 19:57
To: BCEL Users List
Subject: Re: Possible bug in InstructionFinder class

This was reported here:
http://issues.apache.org/bugzilla/show_bug.cgi?id=40044

and fixed in svn head.


----- Original Message -----
From: "Nicholson, Jonathan O H" <[EMAIL PROTECTED]>
To: "BCEL Users List" <bcel-user@jakarta.apache.org>
Sent: Friday, June 22, 2007 7:13 PM
Subject: Possible bug in InstructionFinder class


Hi there,

Been playing with the InstructionFinder class, and it seems that it
always 
returns an extra instruction handler in the resulting array, causing an 
exception if the last instruction being looked for is a return.

I've looked in the source (downloaded today) and found the problem,
there is 
a line in search(String, InstructionHandle, CodeConstraint) that reads:
int lenExpr = (endExpr - startExpr) + 1;

Not sure why that 1 is there... removing it makes the class work
correctly.

Hope this helps others who've had similar issues
Mac

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to