Boolean getter method signature

755 views
Skip to first unread message

Josh Peters

unread,
Dec 8, 2010, 10:19:53 AM12/8/10
to Project Lombok
The small print on the @Getter/@Setter page (http://projectlombok.org/
features/GetterSetter.html) states that if I have a java.lang.Boolean
field the method get<FieldName> should be created instead of
is<FieldName>.

I have a data class that I am upgrading to incorporate Lombok, and I
have a field named isAthlete. isAthlete is a j.l.Boolean, but Lombok
is generating a public getter method called "isAthlete()"

What am I missing? I have downstream code that expects the
getIsAthlete() method to exist. Since I am using @Data, I will have to
workaround this by using @Getter( AccessLevel = NONE ) on my field,
but I'd like to understand if the issue is with the fine print, my
reading of it, or did I discover a bug?

Thanks for a kick-ass product!

Roel Spilker

unread,
Dec 8, 2010, 10:51:06 AM12/8/10
to project...@googlegroups.com
Hi Josh,

This is a known issue: http://code.google.com/p/projectlombok/issues/detail?id=148

We still have to find the right way to fix it: fix the documentation or the behavior. Please comment on the issue to let us know your preference.

Roel

> -----Oorspronkelijk bericht-----
> Van: jcpe...@gmail.com
> [mailto:project...@googlegroups.com] Namens Josh Peters
> Verzonden: 08 December 2010 16:20
> Aan: Project Lombok
> Onderwerp: [project lombok] Boolean getter method signature

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

Reply all
Reply to author
Forward
0 new messages