Avoid Inconsistent Builder With Lomboks @Builder
In a project I worked on I saw that nearly every entity and value object was created with Lomboks @Builder . Their reason is that it makes it easier to construct these objects - especially for tests. But it comes with a cost. The problems that these builders create can’t be detected by the compiler and are especially dangerous in every CI environment. Let’s look at an example. This is our object that uses the builder for construction: