@Data generates getters/setters, but I get a compilation error calling those methods

1,727 views
Skip to first unread message

Brian Gray

unread,
Nov 25, 2011, 8:48:11 AM11/25/11
to project...@googlegroups.com
Hi all/Reinier,

Fantastic library! This is my first time using it and it has really saved me so much code.

I have run into a problem in a few cases that I just can't figure out. Within the class with the actual @Data or @Getter / @Setter tags, the compiler and Eclipse is happy:

But when I reference that same generated method, I get a compiler error:

Any idea what's going on here? I did the lombok install and I am using 0.10.4.

Thanks!
-Brian

Robbert Jan Grootjans

unread,
Nov 26, 2011, 11:34:38 AM11/26/11
to project...@googlegroups.com

hey Brian,

I tried to duplicate your issue, and I seemed to get the error at first, but after a change to the class annotated with @Data, the error disappeared. Reverting the code did not bring the error back. I'll have to take a more detailed look into this.

Could you register an issue at http://code.google.com/p/projectlombok/issues/list ?

thanks in advance,

Robbert Jan.


--
You received this message because you are subscribed to the Google
Groups group for http://projectlombok.org/
 
To post to this group, send email to project...@googlegroups.com
To unsubscribe from this group, send email to
project-lombo...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/project-lombok?hl=en

Ali Lozano

unread,
Nov 28, 2011, 6:47:43 AM11/28/11
to Project Lombok
I have the same error, i add @Data to the class, and i can see the
methods on the content assistent and the outline view, but when i use,
it show error.. like the Brian's screenshot.

On Nov 26, 11:34 am, Robbert Jan Grootjans <grootj...@gmail.com>
wrote:


> hey Brian,
>
> I tried to duplicate your issue, and I seemed to get the error at first,
> but after a change to the class annotated with @Data, the error
> disappeared. Reverting the code did not bring the error back. I'll have to
> take a more detailed look into this.
>
> Could you register an issue athttp://code.google.com/p/projectlombok/issues/list?
>
> thanks in advance,
>
> Robbert Jan.
>
>
>
>
>
>
>
> On Fri, Nov 25, 2011 at 2:48 PM, Brian Gray <bg...@summa-tech.com> wrote:
> > Hi all/Reinier,
>
> > Fantastic library! This is my first time using it and it has really saved
> > me so much code.
>
> > I have run into a problem in a few cases that I just can't figure out.
> > Within the class with the actual @Data or @Getter / @Setter tags, the
> > compiler and Eclipse is happy:
>

> > <https://lh6.googleusercontent.com/-ZUfVBZ2Eerk/Ts-cQ3KfW2I/AAAAAAAAAA...>


> > But when I reference that same generated method, I get a compiler error:
>

> > <https://lh3.googleusercontent.com/-KO4N2mg8DbI/Ts-ccTgOM8I/AAAAAAAAAA...>


> > Any idea what's going on here? I did the lombok install and I am using
> > 0.10.4.
>
> > Thanks!
> > -Brian
>
> > --
> > You received this message because you are subscribed to the Google

> > Groups group forhttp://projectlombok.org/

Brian Gray

unread,
Nov 28, 2011, 4:38:38 PM11/28/11
to project...@googlegroups.com, robbe...@dds.nl
Thanks for the reply -- I posted an issue:


I also included an Eclipse project (you can import with Maven or Eclipse) that is just 2 source files and the lombok dependency. Let me know if you can replicate the problem.

I have seen the problem now in all kinds of other circumstances (generated constructors, etc.), Eclipse auto-complete will show me the code is there, then I get a compiler error. Any help will be greatly appreciated! Now I have seen the power it will be so hard to go back!

Thanks!
Reply all
Reply to author
Forward
0 new messages