@Delegate @Getter(lazy=true) doesn't work. #401

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

Projects

None yet

2 participants

@lombokissues
Collaborator

Migrated from Google Code (issue 328)

@lombokissues
Collaborator

๐Ÿ‘ค reinierz ย  ๐Ÿ•— Jan 18, 2012 at 23:42 UTC

This should translate to: As if the @ Delegate was on the getX() method instead.

@lombokissues
Collaborator

๐Ÿ‘ค r.spilker ย  ๐Ÿ•— Jan 23, 2012 at 20:56 UTC

If @ Delegate is put on a field that also has @ Getter(lazy=true), the getter should be used in all delegated methods instead of the fields directly.

@lombokissues
Collaborator

๐Ÿ‘ค r.spilker ย  ๐Ÿ•— Jan 23, 2012 at 21:42 UTC

(Also, if @ Delegate does not explicitly specify a type, we should use the original type of the field. In the case of @ Delegate @ Getter(lazy=true), we currently substitute the AtomicReference created by the lazy getter.)

@lombokissues
Collaborator

๐Ÿ‘ค r.spilker ย  ๐Ÿ•— Jan 23, 2012 at 23:10 UTC

On second thought, I think we should always use the getter if we generate one. Not only if lazy=true

We do have an opt-out mechanism for this in @ EqualsAndHashCode. At this point we don't see a need for this in @ Delegate.

@lombokissues
Collaborator

๐Ÿ‘ค r.spilker ย  ๐Ÿ•— Jan 24, 2012 at 02:15 UTC

Feature added in fc7ca61

@lombokissues
Collaborator

๐Ÿ‘ค reinierz ย  ๐Ÿ•— Feb 15, 2012 at 03:38 UTC

Will be in version following 0.10.8

@lombokissues lombokissues added this to the 0.10.9 milestone Jul 14, 2015
@lombokissues
Collaborator

End of migration

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