When using @Builder annotation the generated ".build()" method returns a value that surely cannot be null.
But the IDE doesn't know that, and, if the "Null Analysis" is enabled, the generated object will be treated as "potentially null".
Unfortunately, the "Non Nullable" annotation is not a java standard, and you can configure the IDE in different ways. For example, in some projects I use spring "org.springframework.lang.NonNull" annotation for that purpose.
So, lombok cannot add automatically this annotation.
I propose to add a specific entry on Lombok Configuration System to let the developer specify a custom annotation to add to generated code.
If the configuration is not present, no annotation will be emitted, on the contrary, the specified one will added to generated code.
Is this a reasonable request? Is it feasible?
Thanks - Lorenzo