@Getter or @Setter on a static field no longer works in v0.9.3 #209

Closed
lombokissues opened this Issue Jul 14, 2015 · 6 comments

Projects

None yet

1 participant

@lombokissues
Collaborator

Migrated from Google Code (issue 136)

@lombokissues
Collaborator

๐Ÿ‘ค reinierz ย  ๐Ÿ•— Jul 28, 2010 at 16:37 UTC

Try to compile this:

class Test {
@ lombok.Getter int foo;
}

and lombok generates a static getter method that contains "return this.foo;" which obviously won't compile.

@lombokissues
Collaborator

๐Ÿ‘ค reinierz ย  ๐Ÿ•— Jul 28, 2010 at 16:50 UTC

Test case confirming this problem has been checked in: 83b4dd8

@lombokissues
Collaborator

๐Ÿ‘ค reinierz ย  ๐Ÿ•— Jul 28, 2010 at 17:12 UTC

Fixed in 357fd95

Edge release with this fix is available from here: https://projectlombok.org/download-edge.html

@lombokissues
Collaborator

๐Ÿ‘ค uebercoder ย  ๐Ÿ•— Sep 02, 2010 at 11:23 UTC

@ Data also doesn't create getter and setter for static members.

@lombokissues
Collaborator

๐Ÿ‘ค reinierz ย  ๐Ÿ•— Sep 03, 2010 at 11:50 UTC

uebercoder: That's by design. If you want them, put @ Getter and @ Setter on the static field.

@lombokissues
Collaborator

End of migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment