You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-user@jakarta.apache.org by m....@4flow.de on 2002/04/05 10:52:47 UTC

Re: Poible problem with MethodGen & long/double param types...

Hi,

> 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)

That's not so bad, although it shouldn't happen of course. It merely
states that the
name of the second parameter is unknown. This information is stored in
an optional
attribute, which may be added for debugging purposes.
Thus this should cause no harm in the generated class.

Actually I found the place in toString() that caused it :) I'll fix it.

Cheers
	Markus

P.S. You may want to use listclass for a more readable view on the
generated class.

Re: Poible problem with MethodGen & long/double param types...

Posted by Jason Dillon <ja...@planet57.com>.
Hi.  Sorry if I was not more clear, but the generated code will not pass the
verifier, with VerifyErrors like this:

java.lang.VerifyError: (class: jatek/server/JaTeKGroupBean$Proxy, method:
ejbSelectGroupMember
signature: (JJ)Ljatek/ser
ver/GroupMember;) Register pair 2/3 contains wrong type

(this is from the JBoss bug report in case you are wondering)

I wrote a testcase which tries many times of method signatures and when
attempting top gen a proxy whcih implements an interface with a long, long
method it will fail.

So it could be that the method code it to blame, but as I took code from a
different method which passes the verifier I am thinking that the method
code is fine.

--jason


On Fri, 5 Apr 2002 m.dahm@4flow.de wrote:

> Hi,
>
> > 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)
>
> That's not so bad, although it shouldn't happen of course. It merely
> states that the
> name of the second parameter is unknown. This information is stored in
> an optional
> attribute, which may be added for debugging purposes.
> Thus this should cause no harm in the generated class.
>
> Actually I found the place in toString() that caused it :) I'll fix it.
>
> Cheers
> 	Markus
>
> P.S. You may want to use listclass for a more readable view on the
> generated class.
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>