Wow, that's _really_ weird. It's definitely not your handlers, it must
be some weird interaction or incompatibility in the way you're
building a custom version of lombok.jar.
Could you do me a favour and try to create yourself a vanilla
lombok.jar without your changes and see if this happens too or not?
Just to be sure that it's not your code but some weirdness in either
the buildscript or our code? Thanks!
On Apr 23, 9:55 am, Franz Allan Valencia See <
franz....@gmail.com>
wrote:
> Good day,
>
> I'm trying to create a simple @Hello field annotation that would create a
> `public String hello<FieldName>() { return "hello " + <fieldName> }`.
>
> First, I created an implementation of JavacAnnotationHandler<Hello>, and
> that worked (I can produce the desired method at it behaves as expected when
> I run on command line (maven)). However, when I created an implementation
> of EclipseAnnotationHandler<Hello>, I can no longer start my eclipse with my
> built lombok.jar. My Eclipse complains about :
>
> Exception in thread "main" java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 9)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationIm pl.java:323)
> at
> sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationI mpl.java:338)
> Caused by: java.lang.IllegalArgumentException: The decisionWrapper method
> must either return 'boolean' or return 'void'.
> at
> lombok.patcher.scripts.ExitFromMethodEarlyScript.<init>(ExitFromMethodEarly Script.java:58)
> at
> lombok.patcher.scripts.ScriptBuilder$ExitEarlyBuilder.build(ScriptBuilder.j ava:151)
> at
> lombok.eclipse.agent.EclipsePatcher.patchAvoidReparsingGeneratedCode(Eclips ePatcher.java:170)
> at
> lombok.eclipse.agent.EclipsePatcher.registerPatchScripts(EclipsePatcher.jav a:59)
> at lombok.eclipse.agent.EclipsePatcher.runAgent(EclipsePatcher.java:48)
> at lombok.core.Agent.runAgents(Agent.java:56)
> at lombok.core.Agent.premain(Agent.java:43)
> ... 6 more
>
> Then when I added more details to that exception, I got this :
>
> Caused by: java.lang.IllegalArgumentException: The decisionWrapper method
> must either return 'boolean' or return 'void'. decisionWrapper
> methodDescriptor is ()L(Ljava/lang/Object;)Z;. Class:
> lombok/eclipse/agent/PatchFixes. MethodName: checkBit24. Parameter Types:
> []. Return Type: (Ljava/lang/Object;)Z.
>
> Any ideas why?
>
> PS: I've attached my java files if anybody's interested in taking a look at
> them :-)
>
> Thanks,
> --
> Franz Allan Valencia See | Java Software Engineer
>
franz....@gmail.com
> Groups group forhttp://
projectlombok.org/
> Hello.java
> < 1KViewDownload
>
> HandleHello.java
> 5KViewDownload
>
> HandleHello.java
> 3KViewDownload