Hey, I am working to fix a bug in side of JBoss, which relates to our
dymanic proxy generation. This was recently switched over to using
BCEL, but it seems like there is a problem.
Before I get into the details, let me say that I am not a VM expert or a
byte code whiz... I generally like to deal with higher level
abstractions, but this bug looked important and well all this BCEL stuff
looks really interesting. That said, this could simply be a problem
with our usage, but based on my investigation today I don't think so...
but who knows.
I did try to look for some bug reports on this already, but either it is
getting too late and I need to go home, or I simply will never
understand how to use Bugzilla...
* * *
We use BCEL to generate proxies to interfaces and abstract classes. But
for simplicily I will keep things to interfaces, as this shows the problem.
Take the given interface:
public interface MyInterface
{
void test(long a, long b);
}
The MethodGen.toString() ends up with:
public void test(long arg0, long)
Where it should be:
public void test(long arg0, long arg1)
It turns out (only did some brief testing) that when using all long or
double types that every other parameter will get corrupted like this.
If you use any other type there are no problems.
* * *
We have a class (called ProxyImplementationFactory... for whatever
reason) which contains helper methods to generate Method objects for
parts of the target proxy. To make sure that none of the BCEL code
inside was messing with this (as I don't really know that much about it
... yet), I took the contents of a method which generates a String
toString() method and used it inside of the method which exhibits this
problem... which it still does/did with this change.
Based on this I am thinking that the problem is with the byte code
generation done under the covers inside of MethodGen and friends. I
spent very little time looking through this code to see if I could find
anything obvious... but no.
I am thinking that the code which deals with generation of the byte code
for the method might not be giving enough space for the long/double...
but that is just a guess, I don't really know how method defs work.
Can someone give me a hand to get this fixed... either help me to get my
code proper or track down a bug in BCEL... or evern better informing me
that this is already fixed.
Many thanks,
--jason
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>