On Wed, Nov 11, 2009 at 5:42 PM, Bart Guijt <[email protected]> wrote:
> I think I am bitten by the same bug here.
>
I think this is a different problem -- the above problem is from getting the
wrong class type from the bytecode (or otherwise incorrectly figuring out
the number of synthetic parameters).
> This piece of code of my Generator:
>
> sw.print("public final void " + service.getName() + "(");
> for (int i = 0; i < params.length; i++) {
> if (i > 0) {
> sw.print(", ");
> }
> sw.print("final " + genUtils.getClassName(params[i].getType()) + " "
> + params[i].getName());
> }
> sw.println(") {");
>
> creates a method declaration like:
>
> public final void serviceName(final int a, final String b) {
>
> since about the same time yesterday my generator outputs this declaration:
>
> public final void serviceName(final int arg0, final String arg1) {
>
> and dropped the original name (a, b), which are used in annotations, so
> they *must* be the same. It seems JParameter.getName() fails to return the
> 'real' name of the parameter!
>
Parameter names of interfaces are not stored in the bytecode, so they are
now fetched on first request from the actual source. It sounds like somehow
that is failing.
Can you set a breakpoint on JAbstractMethod.getRealParameterName and walk
through it to see what happens?
--
John A. Tamplin
Software Engineer (GWT), Google
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---