NEW in Lombok 1.18.22: val gets replaced with final var.
From how I read it, it means that if I use Lombok >= 1.18.22 I should use
final var now, am I wrong?
Thanks in advance!
Rawi
unread,
May 14, 2024, 11:54:29 AMMay 14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Project Lombok
No, you can still use val, but if you delombok your code it will be replaced with final var instead of the inferred type. We changed this to fix a bunch of bugs and simplify our code. If you are still using an old java version, lombok will use the inferred types as shown on the example page.
Mati Urban
unread,
May 15, 2024, 11:27:37 AMMay 15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Project Lombok
Thank you very much, Rawi, that solves my issue!
However, I'd like to suggest change in documentation to include that detail: otherwise there may be more confused people like me :)