Migrated from Google Code (issue 345)
👤 reinierz 🕗 Feb 14, 2012 at 00:14 UTC
This is the stupidest bug report ever, because this is only an issue with constants, and why the heck would you want to @ Getter(lazy=true) on a constant?
private byte test = 1;
is fine, but throw a @ Getter(lazy=true) in there and it'll fail to compile, complaining that AtomicReference<Byte>(int) does not exist. Indeed it doesn't; only AtomicReference<Byte>(Byte) exists, and there's no type coercion+boxing path that leads from int to Byte.
👤 reinierz 🕗 Feb 14, 2012 at 00:15 UTC
Wont fix anytime this century because it's actually relatively difficult to do so and as stated in the report this will never happen in real life.
Note that we might revisit the way we generate lazy constructors, and there's a chance this bug will end up solving itself when we do.
👤 reinierz 🕗 Feb 14, 2012 at 00:39 UTC
Whoops - the same problem occurs with something like:
@ Getter(lazy=true) private long foo = someExpensiveCalculationThatReturnsAnInt();
Fortunately, we figured out a really easy and elegant fix which we'll be committing shortly.
👤 reinierz 🕗 Feb 14, 2012 at 17:20 UTC
Fixed. Will be in whatever follows 0.10.8
End of migration